Documentation ¶
Index ¶
- Constants
- func DecodeDxValue(val *Value, v *C.DX_TAG_VALUE, valType uint16)
- func DecodeTopic(topic string) (string, string, string)
- func EncodeDxValue(val *Value, v *C.DX_TAG_VALUE, valType uint16)
- func EncodeTopic(module, source, tag string) string
- func FreeAlloc(val *C.DX_TAG_VALUE, valType uint16)
- func GetTimestamp() int64
- type DataExchange
- func (d *DataExchange) Close() error
- func (d *DataExchange) Publish(topic string, valType uint16, val *Value, ts uint64) error
- func (d *DataExchange) Subscribe(topic string) error
- func (d *DataExchange) SubscribeCallback(hnd OnTagCallback) error
- func (d *DataExchange) UnSubscribe(topic string) error
- type MQConfig
- type OnTagCallback
- type Tag
- type Tagf
- func (self *Tagf) Delete() error
- func (self *Tagf) Get(module, source, tag string) *Tag
- func (self *Tagf) Publish(modName, srcName, tagName string, val *Value, valType uint16, timestamp uint64) error
- func (self *Tagf) Subscribe(modName, sourceName, tagName string) error
- func (self *Tagf) SubscribeCallback(ontag OnTagCallback) error
- func (self *Tagf) TagList() []Tag
- func (self *Tagf) UnSubscribe(modName, sourceName, tagName string) error
- type Value
Constants ¶
View Source
const ( ERR_SUCESS = 0 ERR_FAILED = 1 ERR_INVALID_INPUT = 2 ERR_NULL_ACCESS = 3 )
View Source
const ( TAG_VALUE_TYPE_BOOLEAN = 0 TAG_VALUE_TYPE_INT8 = 1 TAG_VALUE_TYPE_INT16 = 2 TAG_VALUE_TYPE_INT32 = 3 TAG_VALUE_TYPE_INT64 = 4 TAG_VALUE_TYPE_INT = 5 TAG_VALUE_TYPE_UINT8 = 6 TAG_VALUE_TYPE_UINT16 = 7 TAG_VALUE_TYPE_UINT32 = 8 TAG_VALUE_TYPE_UINT64 = 9 TAG_VALUE_TYPE_UINT = 10 TAG_VALUE_TYPE_FLOAT = 11 TAG_VALUE_TYPE_DOUBLE = 12 TAG_VALUE_TYPE_STRING = 13 TAG_VALUE_TYPE_BYTEARRAY = 14 TAG_VALUE_TYPE_RAW = 0xFF )
Variables ¶
This section is empty.
Functions ¶
func DecodeDxValue ¶ added in v1.0.0
func DecodeDxValue(val *Value, v *C.DX_TAG_VALUE, valType uint16)
func EncodeDxValue ¶ added in v1.0.0
func EncodeDxValue(val *Value, v *C.DX_TAG_VALUE, valType uint16)
func EncodeTopic ¶
func FreeAlloc ¶ added in v1.0.0
func FreeAlloc(val *C.DX_TAG_VALUE, valType uint16)
func GetTimestamp ¶ added in v1.1.0
func GetTimestamp() int64
Types ¶
type DataExchange ¶ added in v1.0.0
type DataExchange struct {
// contains filtered or unexported fields
}
func NewDataExchange ¶ added in v1.0.0
func NewDataExchange() *DataExchange
func (*DataExchange) Close ¶ added in v1.0.0
func (d *DataExchange) Close() error
func (*DataExchange) Subscribe ¶ added in v1.0.0
func (d *DataExchange) Subscribe(topic string) error
func (*DataExchange) SubscribeCallback ¶ added in v1.0.0
func (d *DataExchange) SubscribeCallback(hnd OnTagCallback) error
func (*DataExchange) UnSubscribe ¶ added in v1.0.0
func (d *DataExchange) UnSubscribe(topic string) error
type OnTagCallback ¶
type Tagf ¶
type Tagf struct {
// contains filtered or unexported fields
}
func (*Tagf) SubscribeCallback ¶
func (self *Tagf) SubscribeCallback(ontag OnTagCallback) error
func (*Tagf) UnSubscribe ¶
Click to show internal directories.
Click to hide internal directories.