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 |
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_List | ( | TAG_INFO *** | list, |
UINT32 * | quantity | ||
) |
[out] | ppList | list of all tags. |
[out] | quantity | quantity 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_MultiTag_Read | ( | UINT8 * | prefixTagName, |
UINT8 * | postfixTagName, | ||
UINT16 | start, | ||
UINT16 | count, | ||
UINT8 * | tagValue, | ||
struct Timestamp * | tagTimeStamp | ||
) |
[in] | prefixTagName | prefix tag name, it could be a null pointer. |
[in] | postfixTagName | postfix tag name, it could be a null pointer. |
[in] | start | tag start |
[in] | count | tag amount |
[out] | tagValue | buffer to store tag values |
[out] | tagTimeStamp | Timestamp of the tag value. A null pointer can be specified to not to return this value. |
TAG_ERR_CODE MX_RTU_MultiTag_Write | ( | UINT8 * | prefixTagName, |
UINT8 * | postfixTagName, | ||
UINT16 | start, | ||
UINT16 | count, | ||
UINT8 * | tagValue | ||
) |
[in] | prefixTagName | prefix tag name, it could be a null pointer. |
[in] | postfixTagName | postfix tag name, it could be a null pointer. |
[in] | start | tag start |
[in] | count | tag amount |
[in] | tagValue | values to be wrote to tags |
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. |