Versions in this module Expand all Collapse all v0 v0.14.3 Oct 20, 2023 v0.14.2 May 10, 2021 Changes in this version + func SendCmd(ctx context.Context, sck Sender, cmd Cmder) error + func SendFrame(ctx context.Context, sck Sender, frame Frame) error + func SendMsg(ctx context.Context, sck Sender, msg MsgFrame) error + type Cmd struct + Body []byte + Type CmdType + type CmdHandler func(ctx Context, resp *Frame, req Frame) error + type CmdType byte + const CmdConfig + const CmdInit + const CmdJoin + const CmdQuit + const CmdReset + const CmdStart + const CmdStatus + const CmdStop + const CmdUnknown + func (cmd CmdType) String() string + type Cmder interface + CmdType func() CmdType + type ConfigCmd struct + InEndPoints []EndPoint + Name string + OutEndPoints []EndPoint + func (cmd *ConfigCmd) UnmarshalTDAQ(p []byte) error + func (cmd ConfigCmd) CmdType() CmdType + func (cmd ConfigCmd) MarshalTDAQ() ([]byte, error) + type Context struct + Ctx context.Context + Msg log.MsgStream + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (dec *Decoder) Decode(ptr interface{}) error + func (dec *Decoder) Err() error + func (dec *Decoder) ReadBool() bool + func (dec *Decoder) ReadF32() float32 + func (dec *Decoder) ReadF64() float64 + func (dec *Decoder) ReadI16() int16 + func (dec *Decoder) ReadI32() int32 + func (dec *Decoder) ReadI64() int64 + func (dec *Decoder) ReadI8() int8 + func (dec *Decoder) ReadStr() string + func (dec *Decoder) ReadU16() uint16 + func (dec *Decoder) ReadU32() uint32 + func (dec *Decoder) ReadU64() uint64 + func (dec *Decoder) ReadU8() uint8 + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (enc *Encoder) Encode(v interface{}) error + func (enc *Encoder) Err() error + func (enc *Encoder) WriteBool(v bool) + func (enc *Encoder) WriteF32(v float32) + func (enc *Encoder) WriteF64(v float64) + func (enc *Encoder) WriteI16(v int16) + func (enc *Encoder) WriteI32(v int32) + func (enc *Encoder) WriteI64(v int64) + func (enc *Encoder) WriteI8(v int8) + func (enc *Encoder) WriteStr(v string) + func (enc *Encoder) WriteU16(v uint16) + func (enc *Encoder) WriteU32(v uint32) + func (enc *Encoder) WriteU64(v uint64) + func (enc *Encoder) WriteU8(v uint8) + type EndPoint struct + Addr string + Name string + Type string + func (ep *EndPoint) UnmarshalTDAQ(b []byte) error + func (ep EndPoint) MarshalTDAQ() ([]byte, error) + type Event struct + Blocks map[uint32][]byte + Descr string + DeviceID uint32 + EvtNbr uint32 + Flags uint32 + RunNbr uint32 + Subs []Event + Tags map[string]interface{} + Timestamp struct{ ... } + TrigNbr uint32 + Type uint32 + Version uint32 + type Frame struct + Body []byte + Path string + Type FrameType + func RecvFrame(ctx context.Context, sck Recver) (frame Frame, err error) + type FrameType byte + const FrameCmd + const FrameData + const FrameEOF + const FrameErr + const FrameMsg + const FrameOK + const FrameUnknown + func (ft FrameType) String() string + type InputHandler func(ctx Context, src Frame) error + type JoinCmd struct + Ctl string + HBeat string + InEndPoints []EndPoint + Log string + Name string + OutEndPoints []EndPoint + func (cmd *JoinCmd) UnmarshalTDAQ(p []byte) error + func (cmd JoinCmd) CmdType() CmdType + func (cmd JoinCmd) MarshalTDAQ() ([]byte, error) + type Marshaler interface + MarshalTDAQ func() ([]byte, error) + type MsgFrame struct + Level log.Level + Msg string + Name string + func (frame *MsgFrame) UnmarshalTDAQ(p []byte) error + func (frame MsgFrame) MarshalTDAQ() ([]byte, error) + type OutputHandler func(ctx Context, dst *Frame) error + type Recver interface + Recv func() ([]byte, error) + type RunControl struct + func NewRunControl(cfg config.RunCtl, stdout io.Writer) (*RunControl, error) + func (rc *RunControl) Do(ctx context.Context, cmd CmdType) error + func (rc *RunControl) NumClients() int + func (rc *RunControl) Run(ctx context.Context) error + type RunHandler func(ctx Context) error + type Sender interface + Send func(msg []byte) error + type Server struct + func New(cfg config.Process, stdout io.Writer) *Server + func (srv *Server) CmdHandle(name string, h CmdHandler) + func (srv *Server) InputHandle(name string, h InputHandler) + func (srv *Server) OutputHandle(name string, h OutputHandler) + func (srv *Server) Run(ctx context.Context) error + func (srv *Server) RunHandle(f RunHandler) + type StatusCmd struct + Name string + Status fsm.Status + func (cmd *StatusCmd) UnmarshalTDAQ(p []byte) error + func (cmd StatusCmd) CmdType() CmdType + func (cmd StatusCmd) MarshalTDAQ() ([]byte, error) + type Unmarshaler interface + UnmarshalTDAQ func(p []byte) error