Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (this *Client) ListenCommand(deviceUri string, serviceUri string, ...) error
- func (this *Client) ListenCommandWithQos(deviceUri string, serviceUri string, qos byte, ...) error
- func (this *Client) Mqtt() paho.Client
- func (this *Client) Publish(topic string, msg interface{}, qos byte) (err error)
- func (this *Client) PublishMqtt4(topic string, msg interface{}, qos byte) (err error)
- func (this *Client) PublishMqtt5(topic string, msg interface{}, qos byte) (err error)
- func (this *Client) SendClientError(message string) error
- func (this *Client) SendDeviceError(deviceUri string, message string) error
- func (this *Client) SendEvent(deviceUri string, serviceUri string, msg platform_connector_lib.EventMsg) (err error)
- func (this *Client) SendEventWithQos(deviceUri string, serviceUri string, msg platform_connector_lib.EventMsg, ...) (err error)
- func (this *Client) Stop()
- func (this *Client) Subscribe(topic string, qos byte, callback func(topic string, pl []byte)) error
- func (this *Client) SubscribeMqtt4(topic string, qos byte, callback func(topic string, pl []byte)) error
- func (this *Client) SubscribeMqtt5(topic string, qos byte, callback func(topic string, pl []byte)) error
- func (this *Client) Unsubscribe(deviceUri string, serviceUri string) (err error)
- func (this *Client) UnsubscribeMqtt4(deviceUri string, serviceUri string) (err error)
- func (this *Client) UnsubscribeMqtt5(deviceUri string, serviceUri string) (err error)
- type DeviceRepresentation
- type MqttVersion
- type Subscription
Constants ¶
View Source
const OwnerInTopicDefault = true
Variables ¶
View Source
var Id = "connector"
values are matching to test server produced by /senergy-platform-connector/test/server/server.go
View Source
var Secret = "d61daec4-40d6-4d3e-98c9-f3b515696fc6"
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HubId string // contains filtered or unexported fields }
func NewWithoutProvisioning ¶
func (*Client) ListenCommand ¶
func (this *Client) ListenCommand(deviceUri string, serviceUri string, handler func(msg platform_connector_lib.CommandRequestMsg) (platform_connector_lib.CommandResponseMsg, error)) error
func (*Client) ListenCommandWithQos ¶
func (this *Client) ListenCommandWithQos(deviceUri string, serviceUri string, qos byte, handler func(msg platform_connector_lib.CommandRequestMsg) (platform_connector_lib.CommandResponseMsg, error)) error
func (*Client) PublishMqtt4 ¶
func (*Client) PublishMqtt5 ¶
func (*Client) SendClientError ¶
func (*Client) SendDeviceError ¶
func (*Client) SendEventWithQos ¶
func (*Client) SubscribeMqtt4 ¶
func (*Client) SubscribeMqtt5 ¶
func (*Client) Unsubscribe ¶
func (*Client) UnsubscribeMqtt4 ¶
type DeviceRepresentation ¶
type Subscription ¶
type Subscription struct { Topic string Handler paho.MessageHandler Qos byte }
Click to show internal directories.
Click to hide internal directories.