Documentation ¶
Index ¶
- type CommandOrEventParam
- type ProductCommandOrEvent
- type ProductConfig
- func (config *ProductConfig) MapToStatus(data map[string]interface{}) ([]protocol.SubData, error)
- func (config *ProductConfig) StatusToMap(status []protocol.SubData) (map[string][]interface{}, error)
- func (config *ProductConfig) ValidateStatus(label string, params []interface{}) (*ProductObject, []interface{}, error)
- type ProductObject
- type StatusParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandOrEventParam ¶
type ProductCommandOrEvent ¶
type ProductCommandOrEvent struct { No int Part int Name string Priority int Params []CommandOrEventParam }
type ProductConfig ¶
type ProductConfig struct { Objects []ProductObject Commands []ProductCommandOrEvent Events []ProductCommandOrEvent }
product config parses the JSON product config string.
func New ¶
func New(config string) (*ProductConfig, error)
func (*ProductConfig) MapToStatus ¶
func (config *ProductConfig) MapToStatus(data map[string]interface{}) ([]protocol.SubData, error)
func (*ProductConfig) StatusToMap ¶
func (config *ProductConfig) StatusToMap(status []protocol.SubData) (map[string][]interface{}, error)
func (*ProductConfig) ValidateStatus ¶
func (config *ProductConfig) ValidateStatus(label string, params []interface{}) (*ProductObject, []interface{}, error)
type ProductObject ¶
type ProductObject struct { Id int No int Label string Part int Status []StatusParam }
type StatusParam ¶
Click to show internal directories.
Click to hide internal directories.