Small CLI monitoring tool to decode proprietary [...] protocol and display info in human readable representation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ycli-mon/ui/helper.go

43 lines
1.1 KiB

package ui
import "cli-mon/yabl"
var fNewCIS = func(packet *yabl.ContactorInternalState) *contactorType {
return &contactorType{state: packet}
}
var fGetCIS = func(c *contactorType) *yabl.ContactorInternalState {
return c.state
}
var fSetCIS = func(c *contactorType, packet *yabl.ContactorInternalState) {
c.state = packet
}
var fNewCES = func(packet *yabl.ContactorInternalErrors) *contactorType {
return &contactorType{errors: packet}
}
var fGetCES = func(c *contactorType) *yabl.ContactorInternalErrors {
return c.errors
}
var fSetCES = func(c *contactorType, packet *yabl.ContactorInternalErrors) {
c.errors = packet
}
var fNewPPE = func(packet *yabl.PuPresentEnergy) *connectorType {
return &connectorType{energy: packet}
}
var fGetPPE = func(c *connectorType) *yabl.PuPresentEnergy {
return c.energy
}
var fSetPPE = func(c *connectorType, packet *yabl.PuPresentEnergy) {
c.energy = packet
}
var fNewPP = func(packet *yabl.PuPeriphery) *connectorType {
return &connectorType{state: packet}
}
var fGetPP = func(c *connectorType) *yabl.PuPeriphery {
return c.state
}
var fSetPP = func(c *connectorType, packet *yabl.PuPeriphery) {
c.state = packet
}