Documentation
¶
Index ¶
- type ASCIIClientHandler
- func (mb *ASCIIClientHandler) Decode(adu []byte) (pdu *ProtocolDataUnit, err error)
- func (mb *ASCIIClientHandler) Encode(pdu *ProtocolDataUnit) (adu []byte, err error)
- func (mb *ASCIIClientHandler) Received(handler func(data []byte))
- func (mb *ASCIIClientHandler) Send(aduRequest []byte) (aduResponse []byte, err error)
- func (mb *ASCIIClientHandler) Verify(aduRequest []byte, aduResponse []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASCIIClientHandler ¶
type ASCIIClientHandler struct {
// contains filtered or unexported fields
}
ASCIIClientHandler implements Packager and Transporter interface.
func NewASCIIClientHandler ¶
func NewASCIIClientHandler(address string) *ASCIIClientHandler
NewASCIIClientHandler allocates and initializes a ASCIIClientHandler.
func (*ASCIIClientHandler) Encode ¶
Encode encodes PDU in a ASCII frame:
Start : 1 char Address : 2 chars Function : 2 chars Data : 0 up to 2x252 chars LRC : 2 chars End : 2 chars
func (*ASCIIClientHandler) Received ¶
func (mb *ASCIIClientHandler) Received(handler func(data []byte))
Click to show internal directories.
Click to hide internal directories.