ioPAC RTU Controllers
C/C++ Sample Code Programming Guide
|
Moxa TAG Library
More...
Modules | |
TagDataType | |
TagEventCondition | |
Data Structures | |
struct | TAG_INFO_T |
struct | TAG_EVENT_CONDITION_T |
Macros | |
#define | TAG_MAX_NAME_SIZE 64 |
Typedefs | |
typedef struct TAG_INFO_T | TAG_INFO |
typedef struct TAG_EVENT_CONDITION_T | TAG_EVENT_CONDITION |
Functions | |
TAG_ERR_CODE | MX_RTU_Tag_Init (void) |
This API must be called at first. More... | |
TAG_ERR_CODE | MX_RTU_Tag_Uninit (void) |
This API must be called at the end. More... | |
TAG_ERR_CODE | MX_RTU_Tag_List_All (void) |
Listing all of the tags. More... | |
TAG_ERR_CODE | MX_RTU_Tag_Get_Info (UINT8 *tagName, TAG_INFO *info) |
TAG_ERR_CODE | MX_RTU_Tag_Read (UINT8 *tagName, void *tagValue, UINT32 tagSize, UINT32 *readBytes, struct Timestamp *time) |
TAG_ERR_CODE | MX_RTU_Tag_Write (UINT8 *tagName, void *tagValue, UINT32 tagSize) |
TAG_ERR_CODE | MX_RTU_Tag_Event_Register (UINT8 *tagName, TAG_EVENT_CONDITION *condition, int *handle) |
TAG_ERR_CODE | MX_RTU_Tag_Event_Unregister (int handle) |
TAG_ERR_CODE | MX_RTU_Tag_Event_Get (int handle, void *tagValue, struct Timestamp *time) |
TAG_ERR_CODE | MX_RTU_Tag_Event_Clear (int handle) |
Moxa TAG Library
Sample Code:
#define TAG_MAX_NAME_SIZE 64 |
typedef struct TAG_INFO_T TAG_INFO |
typedef struct TAG_EVENT_CONDITION_T TAG_EVENT_CONDITION |
enum TAG_ERR_CODE |
enum STATUS_CODE |
TAG_ERR_CODE MX_RTU_Tag_Init | ( | void | ) |
This API must be called at first.
TAG_ERR_CODE MX_RTU_Tag_Uninit | ( | void | ) |
This API must be called at the end.
TAG_ERR_CODE MX_RTU_Tag_List_All | ( | void | ) |
Listing all of the tags.
TAG_ERR_CODE MX_RTU_Tag_Get_Info | ( | UINT8 * | tagName, |
TAG_INFO * | info | ||
) |
[in] | tagName | name of the tag |
[out] | info | TAG_INFO of the specified tag. |
TAG_ERR_CODE MX_RTU_Tag_Read | ( | UINT8 * | tagName, |
void * | tagValue, | ||
UINT32 | tagSize, | ||
UINT32 * | readBytes, | ||
struct Timestamp * | time | ||
) |
[in] | tagName | name of the tag |
[out] | tagValue | buffer to store the tag value |
[in] | tagSize | size of the specified tag. |
[out] | readBytes | actually read bytes. A null pointer can be specified to not to return this value. |
[out] | time | Timestamp of the tag value. A null pointer can be specified to not to return this value. |
TAG_ERR_CODE MX_RTU_Tag_Write | ( | UINT8 * | tagName, |
void * | tagValue, | ||
UINT32 | tagSize | ||
) |
[in] | tagName | name of the tag |
[in] | tagValue | value to be wrote to the tag |
[in] | tagSize | size of the specified tag. |
TAG_ERR_CODE MX_RTU_Tag_Event_Register | ( | UINT8 * | tagName, |
TAG_EVENT_CONDITION * | condition, | ||
int * | handle | ||
) |
[in] | tagName | name of the tag |
[in] | condition | condition of the event. Refer to TagEventCondition. |
[out] | handle | a handle, like a file descriptor, stands for this tag event. |
TAG_ERR_CODE MX_RTU_Tag_Event_Unregister | ( | int | handle | ) |
[in] | handle | a handle, like a file descriptor, stands for the tag event. |
TAG_ERR_CODE MX_RTU_Tag_Event_Get | ( | int | handle, |
void * | tagValue, | ||
struct Timestamp * | time | ||
) |
[in] | handle | a handle, like a file descriptor, stands for the tag event. |
[out] | tagValue | buffer to store the tag value when the condition is matched. |
[out] | time | Timestamp of the tag value. A null pointer can be specified to not to return this value. |
TAG_ERR_CODE MX_RTU_Tag_Event_Clear | ( | int | handle | ) |
[in] | handle | a handle, like a file descriptor, stands for the tag event. |