📄 ecuserdefined.h
字号:
#ifndef __ECUserDefined_h__
#define __ECUserDefined_h__
/* ! */
#include "ECInterface.h"
/* ! User defined Assembly Object Instances */
typedef struct s_UserDefinedAssemblyInstance{
/* ! */
unsigned int itsInstanceNo;
e_UserDefinedAssemblyInstance itsSYType;
int itsAppDataAreaId;
unsigned int itsMaxDataByteSize;
/* ! */
unsigned int itsUserDataByteSize;
/*
** start edits: September,9th 2005, H.F.
*/
BOOL itsExclusiveOwnedStatus; /* Indicates, whether the Assembly
Instance is the Consumer Connection
Point in an Exclusive Owner Connection
and therefore owned. Another Exclusive
Owner Connection which specifies the
same O=>T path is not allowed then. */
/*
** end edits: September,9th 2005, H.F.
*/
/*
** start edits: September,19th 2005, H.F.
*/
WORD itsState; /* Indicates the state of the Assembly
Instance:
|
Bit | Description
------------------------------------
0 | run = 1, idle = 0
|
1 - 2 | non-existent = 00,
| inactive = 01,
| active = 10
| (Note: Do not use 11! It will
| result in bad performance!)
|
3 | configured = 1, not configured = 0
|
4 - 15 | unused (shall be 0)
*/
int itsIOConnectionCount; /* number of I/O connections, this Assembly
instance is used with
*/
/*
** end edits: September,19th 2005, H.F.
*/
}t_UserDefinedAssemblyInstance;
/* ! */
typedef struct s_UserDefinedAssembly{
unsigned int itsInstancesCount;
t_UserDefinedAssemblyInstance *itsInstances;
}t_UserDefinedAssembly;
extern t_UserDefinedAssembly *gUserDefinedAssembly;
/* ! */
t_UserDefinedAssemblyInstance *EC_FindUserDefinedAssemblyInstance( unsigned int theInstanceNo );
int EC_FindUserDefinedAssemblyInstanceNoByAppDataAreaId( int theAppDataAreaId );
/* ! Typedefs for User defined Objects: Class/Instance/Attributes */
typedef struct s_Class t_Class;
typedef struct s_Attribute t_Attribute;
typedef struct s_Instance t_Instance;
/* ! Structures for user defined Objects */
typedef struct s_UserDefined{
/* ! */
unsigned int itsClassesCount;
t_Class *itsClasses;
}t_UserDefined;
/* ! */
extern t_UserDefined *gUserDefined;
/* ! */
typedef struct s_Class{
/* ! */
unsigned int itsClassCode;
/* ! */
unsigned int itsAttributesCount;
t_Attribute *itsAttributes;
/* ! */
unsigned int itsInstancesCount;
t_Instance *itsInstances;
}t_Class;
/* ! */
typedef struct s_Attribute{
/* ! */
unsigned char itsAttributeCode;
int itsIsReadOnly;
/* ! */
void *itsDataPtr;
unsigned int itsDataSize;
}t_Attribute;
/* ! */
typedef struct s_Instance{
/* ! */
unsigned int itsInstanceCode;
/* ! */
unsigned int itsAttributesCount;
t_Attribute *itsAttributes;
}t_Instance;
/* ! */
unsigned int GetClassAttributesByteSize( t_Class *theClass );
void GetClassAttributes( unsigned char *theBuf, t_Class *theClass );
void SetClassAttributes( unsigned char *theBuf, t_Class *theClass );
t_Attribute *GetClassAttribute( t_Class *theClass, unsigned char theAttributeCode );
/* ! */
unsigned int GetInstanceAttributesByteSize( t_Instance *theInstance );
void GetInstanceAttributes( unsigned char *theBuf, t_Instance *theInstance );
void SetInstanceAttributes( unsigned char *theBuf, t_Instance *theInstance );
t_Attribute *GetInstanceAttribute( t_Instance *theInstance, unsigned char theAttributeCode );
unsigned int GetAttributeByteSize( t_Attribute *theAttribute );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -