Documentation ¶
Index ¶
Constants ¶
View Source
const AutoType = "udmi"
Variables ¶
View Source
var ( ErrAlreadyRunning = errors.New("already running") ErrNotRunning = errors.New("not running") )
View Source
var Factory auto.Factory = factory{}
Functions ¶
Types ¶
type ConfigMessage ¶
type ConfigMessage struct {
PointSet ConfigPointSet `json:"pointset"`
}
ConfigMessage is a UDMI config message, used for control/settings https://faucetsdn.github.io/udmi/docs/messages/pointset.html#config
type ConfigPointSet ¶
type ConfigPointSet struct {
Points map[string]PointSetValue `json:"points"`
}
ConfigPointSet is a UDMI point set, for config messages https://faucetsdn.github.io/udmi/docs/messages/pointset.html#config
type PointSetValue ¶
type PointSetValue struct {
SetValue any `json:"set_value"`
}
PointSetValue is a single UDMI point with set value, for config messages https://faucetsdn.github.io/udmi/docs/messages/pointset.html#config
type PointValue ¶
type PointValue struct { // should be a primitive value: string, bool, float... PresentValue any `json:"present_value"` }
PointValue is a single UDMI point value see https://faucetsdn.github.io/udmi/docs/messages/pointset.html#event
type PointsEvent ¶
type PointsEvent map[string]PointValue
PointsEvent presents the JSON payload of a UDMI Event message see https://faucetsdn.github.io/udmi/docs/messages/pointset.html#event
func (PointsEvent) Equal ¶
func (f PointsEvent) Equal(other PointsEvent) bool
type PubSub ¶
type PubSub struct { Publisher Subscriber }
type PublisherFunc ¶
type Subscriber ¶
type SubscriberFunc ¶
func (SubscriberFunc) Subscribe ¶
func (p SubscriberFunc) Subscribe(ctx context.Context, topic string, cb mqtt.MessageHandler) error
Click to show internal directories.
Click to hide internal directories.