Versions in this module Expand all Collapse all v0 v0.0.1 Mar 30, 2023 Changes in this version + const MESSAGE_ATTENTION_RESPONSE + const MESSAGE_CLOSE_REQUEST + const MESSAGE_CLOSE_RESPONSE + const MESSAGE_GET_LIST_REQUEST + const MESSAGE_GET_LIST_RESPONSE + const MESSAGE_GET_PROC_PARAMETER_REQUEST + const MESSAGE_GET_PROC_PARAMETER_RESPONSE + const MESSAGE_GET_PROFILE_LIST_REQUEST + const MESSAGE_GET_PROFILE_LIST_RESPONSE + const MESSAGE_GET_PROFILE_PACK_REQUEST + const MESSAGE_GET_PROFILE_PACK_RESPONSE + const MESSAGE_OPEN_REQUEST + const MESSAGE_OPEN_RESPONSE + const MESSAGE_SET_PROC_PARAMETER_REQUEST + const MESSAGE_SET_PROC_PARAMETER_RESPONSE + const OCTET_ANOTHER_TL + const OCTET_LENGTH_FIELD + const OCTET_MESSAGE_END + const OCTET_OPTIONAL_SKIPPED + const OCTET_TYPE_BOOLEAN + const OCTET_TYPE_FIELD + const OCTET_TYPE_INTEGER + const OCTET_TYPE_LIST + const OCTET_TYPE_OCTET_STRING + const OCTET_TYPE_UNSIGNED + const TYPE_NUMBER_16 + const TYPE_NUMBER_32 + const TYPE_NUMBER_64 + const TYPE_NUMBER_8 + var ErrSequenceTooLong = errors.New("max sequence length exceeded") + var ErrUnrecognizedSequence = errors.New("unrecognized sequence") + func Read(r *bufio.Reader, opts ...ReadOption) error + type Buffer struct + Bytes []byte + Cursor int + func (buf *Buffer) BooleanParse() (bool, error) + func (buf *Buffer) Debug() + func (buf *Buffer) Expect(expectedType uint8, expectedLength int) error + func (buf *Buffer) ExpectType(expectedType uint8) error + func (buf *Buffer) GetCurrentByte() byte + func (buf *Buffer) GetNextLength() int + func (buf *Buffer) GetNextType() uint8 + func (buf *Buffer) I16Parse() (int16, error) + func (buf *Buffer) I32Parse() (int32, error) + func (buf *Buffer) I64Parse() (int64, error) + func (buf *Buffer) I8Parse() (int8, error) + func (buf *Buffer) NumberParse(numType uint8, maxSize int) (int64, error) + func (buf *Buffer) OctetStringParse() (OctetString, error) + func (buf *Buffer) OptionalIsSkipped() bool + func (buf *Buffer) StatusParse() (int64, error) + func (buf *Buffer) TimeParse() (Time, error) + func (buf *Buffer) U16Parse() (uint16, error) + func (buf *Buffer) U32Parse() (uint32, error) + func (buf *Buffer) U64Parse() (uint64, error) + func (buf *Buffer) U8Parse() (uint8, error) + func (buf *Buffer) UpdateBytesRead(delta int) + func (buf *Buffer) ValueParse() (Value, error) + type CloseRequest struct + GlobalSignature OctetString + func CloseRequestParse(buf *Buffer) (CloseRequest, error) + type CloseResponse CloseRequest + func CloseResponseParse(buf *Buffer) (CloseResponse, error) + type GetListRequest struct + ClientID OctetString + ListName OctetString + Password OctetString + ServerID OctetString + Username OctetString + func GetListRequestParse(buf *Buffer) (GetListRequest, error) + type GetListResponse struct + ActGatewayTime Time + ActSensorTime Time + ClientID OctetString + ListName OctetString + ListSignature OctetString + ServerID OctetString + ValList []*ListEntry + func GetListResponseParse(buf *Buffer) (GetListResponse, error) + type ListEntry struct + ObjName OctetString + Unit uint8 + Value Value + ValueSignature OctetString + func ListEntryParse(buf *Buffer) (*ListEntry, error) + func ListParse(buf *Buffer) ([]*ListEntry, error) + func (le *ListEntry) Float() float64 + func (le *ListEntry) ObjectName() string + func (le *ListEntry) Scaler() float64 + func (le *ListEntry) String() string + func (le *ListEntry) ValueString() string + type Message struct + AbortOnError uint8 + Crc uint16 + GroupID uint8 + MessageBody MessageBody + TransactionID OctetString + func MessageParse(buf *Buffer, validate ...bool) (*Message, error) + type MessageBody struct + Data MessageBodyData + Tag uint32 + func MessageBodyParse(buf *Buffer) (MessageBody, error) + type MessageBodyData interface + type OctetString []byte + type OpenRequest struct + ClientID OctetString + Codepage OctetString + Password OctetString + ReqFileID OctetString + ServerID OctetString + Username OctetString + Version uint8 + func OpenRequestParse(buf *Buffer) (OpenRequest, error) + type OpenResponse struct + ClientID OctetString + Codepage OctetString + RefTime Time + ReqFileID OctetString + ServerID OctetString + Version uint8 + func OpenResponseParse(buf *Buffer) (OpenResponse, error) + type ReadOption func(*options) + func WithObisCallback(obisCode OctetString, callback func(message *ListEntry)) ReadOption + type Time uint32 + type Value struct + DataBoolean bool + DataBytes OctetString + DataInt int64 + Typ uint8