func (p BindTRxResp) MarshalBinary() ([]byte, error) {
	return cStringOptsRespMarshal(p.SystemID, p.Options)
}
MarshalBinary implements encoding.BinaryMarshaler interface.
package pdu
import (
	"fmt"
)
type BindTx struct {
	SystemID         string
	Password         string
	SystemType       string
	InterfaceVersion int
	AddrTon          int
	AddrNpi          int
	AddressRange     string
}
func (p BindTx) CommandID() CommandID {
	return BindTransmitterID
}
func (p BindTx) Response(sysID string) *BindTxResp {
	return &BindTxResp{
		SystemID: sysID,
	}
}
func (p BindTx) MarshalBinary() ([]byte, error) {
	return marshalBind(
		p.SystemID,
		p.Password,
		p.SystemType,
		p.InterfaceVersion,
		p.AddrTon,
		p.AddrNpi,
		p.AddressRange,
	)
}
func (p *BindTx) UnmarshalBinary(body []byte) error {
	return unmarshalBind(
		body,
		&p.SystemID,
		&p.Password,
		&p.SystemType,
		&p.InterfaceVersion,
		&p.AddrTon,
		&p.AddrNpi,
		&p.AddressRange,
	)
}
type BindTxResp struct {
	SystemID string
	Options  *Options
}
func (p BindTxResp) CommandID() CommandID {
	return BindTransmitterRespID
}
func (p BindTxResp) MarshalBinary() ([]byte, error) {
	return cStringOptsRespMarshal(p.SystemID, p.Options)
}
func (p *BindTxResp) UnmarshalBinary(body []byte) error {
	var err error
	p.SystemID, p.Options, err = cStringOptsRespUnmarshal(body)
	return err
}
type BindRx struct {
	SystemID         string
	Password         string
	SystemType       string
	InterfaceVersion int
	AddrTon          int
	AddrNpi          int
	AddressRange     string
}
func (p BindRx) CommandID() CommandID {
	return BindReceiverID
}
func (p BindRx) Response(sysID string) *BindRxResp {
	return &BindRxResp{
		SystemID: sysID,
	}
}
func (p BindRx) MarshalBinary() ([]byte, error) {
	return marshalBind(
		p.SystemID,
		p.Password,
		p.SystemType,
		p.InterfaceVersion,
		p.AddrTon,
		p.AddrNpi,
		p.AddressRange,
	)
}
func (p *BindRx) UnmarshalBinary(body []byte) error {
	return unmarshalBind(
		body,
		&p.SystemID,
		&p.Password,
		&p.SystemType,
		&p.InterfaceVersion,
		&p.AddrTon,
		&p.AddrNpi,
		&p.AddressRange,
	)
}
type BindRxResp struct {
	SystemID string
	Options  *Options
}
func (p BindRxResp) CommandID() CommandID {
	return BindReceiverRespID
}
func (p BindRxResp) MarshalBinary() ([]byte, error) {
	return cStringOptsRespMarshal(p.SystemID, p.Options)
}
func (p *BindRxResp) UnmarshalBinary(body []byte) error {
	var err error
	p.SystemID, p.Options, err = cStringOptsRespUnmarshal(body)
	return err
}
type BindTRx struct {
	SystemID         string
	Password         string
	SystemType       string
	InterfaceVersion int
	AddrTon          int
	AddrNpi          int
	AddressRange     string
}
func (p BindTRx) CommandID() CommandID {
	return BindTransceiverID
}
func (p BindTRx) Response(sysID string) *BindTRxResp {
	return &BindTRxResp{
		SystemID: sysID,
	}
}
func (p BindTRx) MarshalBinary() ([]byte, error) {
	return marshalBind(
		p.SystemID,
		p.Password,
		p.SystemType,
		p.InterfaceVersion,
		p.AddrTon,
		p.AddrNpi,
		p.AddressRange,
	)
}
func (p *BindTRx) UnmarshalBinary(body []byte) error {
	return unmarshalBind(
		body,
		&p.SystemID,
		&p.Password,
		&p.SystemType,
		&p.InterfaceVersion,
		&p.AddrTon,
		&p.AddrNpi,
		&p.AddressRange,
	)
}
type BindTRxResp struct {
	SystemID string
	Options  *Options
}
func (p BindTRxResp) CommandID() CommandID {
	return BindTransceiverRespID
}