Data Acquisition Framework
API for Tags Programming
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Modules
Typedefs | Functions
TagV2 object

Typedefs

typedef struct tag_ tag
 Tag instance.
 
typedef void(* on_tag )(tag *self, const char *equipment_name, const char *tag_name, value_t *value, value_type_t value_type, const char *unit, const char *time)
 Subscribe to callback function. More...
 

Functions

tagtag_new ()
 Create a tag. More...
 
void tag_delete (tag *self)
 Delete a tag instance. More...
 
int tag_publish (tag *self, const char *equipment_name, const char *tag_name, value_t *value, value_type_t value_type, const char *unit, const char *time)
 Publish a tag. More...
 
int tag_subscribe (tag *self, const char *equipment_name, const char *tag_name)
 Subscribe to a tag. More...
 
int tag_unsubscribe (tag *self, const char *equipment_name, const char *tag_name)
 Unsubscribe from a tag. More...
 
int tag_subscribe_callback (tag *self, on_tag)
 Set the subscribe-callback function. More...
 

Detailed Description

Typedef Documentation

typedef void(* on_tag)(tag *self,const char *equipment_name,const char *tag_name,value_t *value,value_type_t value_type,const char *unit,const char *time)

Subscribe to callback function.

See also
tag_subscribe()
tag_subscribe_callback()

Function Documentation

void tag_delete ( tag self)

Delete a tag instance.

See also
tag_new()
Parameters
[in]selfInstance to be deleted
tag* tag_new ( )

Create a tag.

Returns
Return tag instance.
Return NULL on failure.
See also
tag_delete()
int tag_publish ( tag self,
const char *  equipment_name,
const char *  tag_name,
value_t value,
value_type_t  value_type,
const char *  unit,
const char *  time 
)

Publish a tag.

Returns
Return 0 on success.
Return -1 on failure.
See also
tag_subscribe()
Parameters
[in]selftag instance
[in]equipment_nameEquipment Name
[in]tag_nameTag Name
[in]valueValue
[in]value_typeValue Type
[in]unitUnit
[in]timeTimestamp
int tag_subscribe ( tag self,
const char *  equipment_name,
const char *  tag_name 
)

Subscribe to a tag.

Returns
Return 0 on success.
Returne -1 on failure.
See also
tag_publish()
tag_unsubscribe()
tag_subscribe_callback()
Parameters
[in]selftag instance
[in]equipment_nameEquipment Name
[in]tag_nameTag Name
int tag_subscribe_callback ( tag self,
on_tag   
)

Set the subscribe-callback function.

Returns
Return 0 on success.
Return -1 on failure.
See also
tag_subscribe()
Parameters
[in]selfTag instance
int tag_unsubscribe ( tag self,
const char *  equipment_name,
const char *  tag_name 
)

Unsubscribe from a tag.

Returns
Return 0 on success.
Return -1 on failure.
See also
tag_subscribe()
Parameters
[in]selftag instance
[in]equipment_nameEquipment Name
[in]tag_nameTag Name