Versions in this module Expand all Collapse all v0 v0.8.1 Sep 6, 2016 Changes in this version + var ErrBitStringToUInt8s = errors.New("Fail to convert bit string to uint8 array") + var ErrBytesToFloat32s = errors.New("Fail to convert byte array to float32 array in four endian orders") + var ErrBytesToInt16s = errors.New("Fail to convert byte array to Int16 array in two endian orders") + var ErrBytesToInt32s = errors.New("Fail to convert byte array to UInt32 array in four endian orders") + var ErrBytesToUInt16s = errors.New("Fail to convert byte array to UInt16 array in two endian orders") + var ErrBytesToUInt32s = errors.New("Fail to convert byte array to UInt32 array in four endian orders") + var ErrDecimalStringToRegisters = errors.New("Fail to convert decimal string to uint16/words array in big endian order") + var ErrHexStringToRegisters = errors.New("Fail to convert hexadecimal string to uint16/words array in big endian order") + var ErrInvalidLengthToConvert = errors.New("Invalid length to convert") + var ErrNotANumber = errors.New("Fail to scale the registers linearly") + var ErrRegistersToBytes = errors.New("Fail to convert registers/uint16 array to byte array in big endian order") + func BitStringToUInt8s(bitString string) ([]uint8, error) + func BytesToFloat32s(buf []byte, endian Endian) ([]float32, error) + func BytesToHexString(bytes []byte) string + func BytesToInt16s(buf []byte, endian Endian) ([]int16, error) + func BytesToInt32s(buf []byte, endian Endian) ([]int32, error) + func BytesToUInt16s(buf []byte, endian Endian) ([]uint16, error) + func BytesToUInt32s(buf []byte, endian Endian) ([]uint32, error) + func DecimalStringToRegisters(decString string) ([]uint16, error) + func HexStringToRegisters(hexString string) ([]uint16, error) + func LinearScalingRegisters(data []uint16, domainLow, domainHigh, rangeLow, rangeHigh float64) ([]float32, error) + func RegistersToBytes(data []uint16) ([]byte, error) + type DMbtcpReadReq struct + Addr uint16 + Cmd int + IP string + Len uint16 + Port string + Slave uint8 + Tid string + type DMbtcpRes struct + Data []uint16 + Status string + Tid string + type DMbtcpTimeout struct + Cmd int + Status string + Tid string + Timeout int64 + type DMbtcpWriteReq struct + Addr uint16 + Cmd int + Data interface{} + IP string + Len uint16 + Port string + Slave uint8 + Tid string + type Endian int + const AB + const ABCD + const BA + const BADC + const BigEndian + const CDAB + const DCBA + const LittleEndian + const MidBigEndian + const MidLittleEndian + type FilterType int + const Change + const Equal + const Greater + const GreaterEqual + const InsideIncRange + const InsideRange + const Less + const LessEqual + const OutsideIncRange + const OutsideRange + type HistoryData struct + Data interface{} + Ts int64 + type IConfig interface + type IFilterDataStore interface + Add func(name string, req interface{}) error + Delete func(name string) + DeleteAll func() + Get func(name string) (interface{}, bool) + GetAll func() interface{} + UpdateAllToggles func(toggle bool) + UpdateToggle func(name string, toggle bool) error + type IHistoryDataStore interface + Add func(name string, data interface{}) error + Get func(name string, limit int) (map[string]string, error) + GetAll func(name string) (map[string]string, error) + GetLatest func(name string) (string, error) + type IProactiveService interface + HandleRequest func(cmd string, r interface{}) error + HandleResponse func(cmd string, r interface{}) error + ParseRequest func(msg []string) (interface{}, error) + ParseResponse func(msg []string) (interface{}, error) + Start func() + Stop func() + type IReaderTaskDataStore interface + Add func(name, tid, cmd string, req interface{}) error + DeleteAll func() + DeleteTaskByID func(tid string) + DeleteTaskByName func(name string) + GetAll func() interface{} + GetTaskByID func(tid string) (interface{}, bool) + GetTaskByName func(name string) (interface{}, bool) + UpdateAllToggles func(toggle bool) + UpdateIntervalByName func(name string, interval uint64) error + UpdateToggleByName func(name string, toggle bool) error + type IWriterTaskDataStore interface + Add func(tid, cmd string) + Delete func(tid string) + Get func(tid string) (string, bool) + type JSONableByteSlice []byte + func (u JSONableByteSlice) MarshalJSON() ([]byte, error) + type MbtcpFilterOpReq struct + Enabled bool + From string + Name string + Tid int64 + type MbtcpFilterStatus struct + Arg []float32 + Enabled bool + From string + Name string + Status string + Tid int64 + Type FilterType + type MbtcpFiltersStatus struct + Filters []MbtcpFilterStatus + From string + Status string + Tid int64 + type MbtcpHistoryData struct + Data interface{} + Name string + Status string + Tid int64 + type MbtcpPollData struct + Bytes JSONableByteSlice + Data interface{} + Name string + Status string + TimeStamp int64 + Type RegValueType + type MbtcpPollOpReq struct + Enabled bool + From string + Interval uint64 + Name string + Tid int64 + type MbtcpPollStatus struct + Addr uint16 + Enabled bool + FC int + From string + IP string + Interval uint64 + Len uint16 + Name string + Order Endian + Port string + Range *ScaleRange + Slave uint8 + Status string + Tid int64 + Type RegValueType + type MbtcpPollsStatus struct + From string + Polls []MbtcpPollStatus + Status string + Tid int64 + type MbtcpReadReq struct + Addr uint16 + FC int + From string + IP string + Len uint16 + Order Endian + Port string + Range *ScaleRange + Slave uint8 + Tid int64 + Type RegValueType + type MbtcpReadRes struct + Bytes JSONableByteSlice + Data interface{} + Status string + Tid int64 + Type RegValueType + type MbtcpSimpleRes struct + Status string + Tid int64 + type MbtcpTimeoutReq struct + Data int64 + From string + Tid int64 + type MbtcpTimeoutRes struct + Data int64 + Status string + Tid int64 + type MbtcpWriteReq struct + Addr uint16 + Data interface{} + FC int + From string + Hex bool + IP string + Len uint16 + Port string + Slave uint8 + Tid int64 + type ReaderTask struct + Cmd string + Name string + Req interface{} + type RegValueType int + const Float32 + const HexString + const Int16 + const Int32 + const RegisterArray + const Scale + const UInt16 + const UInt32 + type ScaleRange struct + DomainHigh float64 + DomainLow float64 + RangeHigh float64 + RangeLow float64 v0.8.0 Aug 10, 2016 v0.7.4 Aug 9, 2016 v0.7.3 Aug 8, 2016 v0.7.0 Aug 3, 2016 v0.4.0 Jul 29, 2016 v0.3.0 Jul 19, 2016