Documentation ¶
Index ¶
- func MatchByteAt(message []byte, b byte, position int) bool
- type Connection
- func (conn *Connection) Connect(connectChan chan error) (err error)
- func (conn *Connection) Reader() error
- func (conn *Connection) Write(msg interfaces.Encodable) error
- func (conn *Connection) WriteAndWaitForReport(msg interfaces.Encodable, t time.Duration, er byte) (<-chan reports.Report, error)
- func (conn *Connection) WriteWithTimeout(msg interfaces.Encodable, t time.Duration) (<-chan *serialapi.Message, error)
- func (conn *Connection) Writer()
- type Controllable
- type Controller
- type Event
- type PortOpener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
func NewConnection ¶
func NewConnection() *Connection
func (*Connection) Connect ¶
func (conn *Connection) Connect(connectChan chan error) (err error)
func (*Connection) Reader ¶
func (conn *Connection) Reader() error
func (*Connection) Write ¶
func (conn *Connection) Write(msg interfaces.Encodable) error
func (*Connection) WriteAndWaitForReport ¶
func (conn *Connection) WriteAndWaitForReport(msg interfaces.Encodable, t time.Duration, er byte) (<-chan reports.Report, error)
func (*Connection) WriteWithTimeout ¶
func (conn *Connection) WriteWithTimeout(msg interfaces.Encodable, t time.Duration) (<-chan *serialapi.Message, error)
func (*Connection) Writer ¶
func (conn *Connection) Writer()
type Controllable ¶
type Controllable interface { On() Off() Level(float64) }
Controllable interface used by nodes and endpoints to controll them
type Controller ¶
type Controller struct { Nodes *nodes.List Connection *Connection `json:"-"` sync.RWMutex // contains filtered or unexported fields }
func ConnectWithCustomPortOpener ¶
func ConnectWithCustomPortOpener(port string, filename string, po PortOpener) (*Controller, error)
func NewController ¶
func NewController() *Controller
func (*Controller) DeliverReportToNode ¶
func (c *Controller) DeliverReportToNode(node byte, report reports.Report)
func (*Controller) GetNextEvent ¶
func (c *Controller) GetNextEvent() chan interface{}
func (*Controller) LoadConfigurationFromFile ¶
func (c *Controller) LoadConfigurationFromFile() error
func (*Controller) SaveConfigurationToFile ¶
func (c *Controller) SaveConfigurationToFile() error
type PortOpener ¶
type PortOpener interface { /* TODO: add methods */ Open() (io.ReadWriteCloser, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.