Versions in this module Expand all Collapse all v1 v1.0.1 Jun 28, 2020 Changes in this version type WirelessScanBegin + func (w *WirelessScanBegin) ToBytes() (data []byte) type WirelessScanEnd + func (w *WirelessScanEnd) ToBytes() (data []byte) type WirelessScanRangeSet + func (w *WirelessScanRangeSet) ToBytes() (data []byte) type WirelessScanTypeSet + func (w *WirelessScanTypeSet) ToBytes() (data []byte) type WirelessScanUpload + func (w *WirelessScanUpload) Parse(data []byte) (err error) type WirelessScanUploadOne + func (w *WirelessScanUploadOne) FlowKB() (kb int) v1.0.0 Jun 23, 2020 Changes in this version + const CMDAESKey + const CMDCamDetectedLANResp + const CMDCamDetectedResp + const CMDCamDetectedV2Resp + const CMDCheckVersionResp + const CMDDetectDataUploadResp + const CMDFirmwareUpdateResp + const CMDHeartbeatResp + const CMDLoginResp + const CMDLogoutResp + const CMDSetDetectPeriodResp + const CMDStopDetectResp + const CMDWifiDetectedResp + const CMDWifiInfoStartResp + const CMDWifiInfoUpdateResp + const CMDWirelessScanBeginResp + const CMDWirelessScanEndResp + const CMDWirelessScanRangeSetResp + const CMDWirelessScanTypeSetResp + const CMDWirelessScanUploadResp + const CMDWirelessSignalReportingResp + const HeaderLen + func AddHeader(cmd CMD, sid uint32, body []byte) (data []byte, err error) + func DecryptBodyData(headerData, encryptBodyData []byte, cry *Encrypt) (data []byte, err error) + func EncodeRespBody(base *RespBase) (data []byte) + func FirmwareUpdateRespToData(firmwareUpdateResp *FirmwareUpdateResp) (data []byte, err error) + func FirmwareUpdateToData(data []byte) (rData [][]byte, rLens []int, err error) + func GenKeyData(mac []byte) (en []byte) + func GetAesKeyAndAesIV(keyData []byte) (AesKey, AesIV []byte, err error) + type CMD int16 + const CMDCamDetected + const CMDCamDetectedLAN + const CMDCamDetectedV2 + const CMDCheckVersion + const CMDDetectDataUpload + const CMDErr + const CMDFirmwareUpdate + const CMDHeartbeat + const CMDLogin + const CMDLogout + const CMDSetDetectPeriod + const CMDStopDetect + const CMDWifiDetected + const CMDWifiInfoStart + const CMDWifiInfoUpdate + const CMDWirelessScanBegin + const CMDWirelessScanEnd + const CMDWirelessScanRangeSet + const CMDWirelessScanTypeSet + const CMDWirelessScanUpload + const CMDWirelessSignalReporting + func (c CMD) String() string + type CamDetected struct + SSID []uint8 + func CamDetectedFromData(data []byte) (camDetected *CamDetected, err error) + type CamDetectedConst struct + ApIssi int8 + CamType uint8 + Channel uint8 + Mac [6]uint8 + SSIDLen uint8 + SecondChannel uint8 + Type uint8 + func (c CamDetectedConst) GetMac(split string) (mac string, err error) + type CamDetectedConstV2 struct + ApIssi int8 + CamType uint8 + Channel uint8 + LinkCnt uint8 + Mac [6]uint8 + Rev [16]uint8 + SSIDLen uint8 + SecondChannel uint8 + Type uint8 + func (c CamDetectedConstV2) GetMac(split string) (mac string) + type CamDetectedLAN struct + Describe []uint8 + func CamDetectedLANFromData(data []byte) (camDetectedLAN *CamDetectedLAN, err error) + type CamDetectedLANConst struct + DescribeLen uint8 + DevType uint8 + IP4 uint32 + Mac [6]uint8 + Rev [30]uint8 + Rssi int8 + Type uint8 + func (c CamDetectedLANConst) GetMac(split string) (mac string, err error) + type CamDetectedV2 struct + SSID []uint8 + func CamDetectedV2FromData(data []byte) (camDetected *CamDetectedV2, err error) + func (c *CamDetectedV2) ToBytes() (data []byte) + type CheckVersionResp struct + FirmwareBuild int16 + FirmwareMajor int8 + FirmwareMinor int8 + HardwareMajor int8 + HardwareMinor int8 + func CheckVersionRespFromData(data []byte) (checkVersionResp *CheckVersionResp, err error) + func (c *CheckVersionResp) Firmware() string + func (c *CheckVersionResp) Hardware() string + func (c *CheckVersionResp) ToData() (data []byte) + type Data0To6GUpload struct + PowerData []uint8 + func (d *Data0To6GUpload) Parse(data []byte) (err error) + type Data0To6GUploadConst struct + Count uint16 + FreqEnd uint64 + FreqStart uint64 + Rev [6]uint8 + type Encrypt struct + AesIV []byte + AesKey []byte + type ErrType int16 + const ErrType_Body + const ErrType_Cmd + const ErrType_Crypt + const ErrType_DeviceNotExist + const ErrType_Header + const ErrType_Internal + const ErrType_MacIdNotExist + const ErrType_MacIdVerifyError + const ErrType_NoSid + const ErrType_NotLogin + const ErrType_Success + const ErrType_Unknown + func GetErrorCode(err error) (code ErrType) + type Error struct + Code ErrType + type FirmwareUpdate struct + Len int16 + Number int8 + Offset int32 + Rev int8 + Size int32 + func FirmwareUpdateFromData(data []byte) (firmwareUpdate *FirmwareUpdate, data_ []byte, err error) + type FirmwareUpdateResp struct + Number int8 + Recvd int32 + Rev int16 + Status int8 + func FirmwareUpdateRespFromData(data []byte) (firmwareUpdateResp *FirmwareUpdateResp, err error) + type Header struct + BodyLen uint32 + CommandId CMD + Sid uint32 + func HeaderFromData(data []byte, cry *Encrypt) (header *Header, err error) + type Header16 struct + Begin uint16 + BodyLen uint32 + CommandId CMD + Sid uint32 + TotalLen uint32 + type HeaderAll struct + Begin uint16 + TotalLen uint32 + type Login struct + Mac [6]byte + func (l *Login) Parse(data []byte) (err error) + type RespBase struct + Code int16 + func DecodeRespBody(data []byte) (base *RespBase, err error) + type WifiInfoStart struct + Macs [][]byte + func (w *WifiInfoStart) ToBytes() (data []byte) + type WifiInfoStartBase struct + Cnt uint8 + NeedRssi int8 + NeedStream int8 + Period int16 + Retrans int8 + type WifiInfoStartResp struct + Cnt int8 + func (w *WifiInfoStartResp) Parse(data []byte) (err error) + type WifiInfoUpdate struct + CRC16 int16 + MapNum int16 + Units []WifiInfoUpdateUnit + func (w *WifiInfoUpdate) Parse(data []byte) (err error) + type WifiInfoUpdateResp struct + Status WifiInfoUpdateRespStatus + func NewWifiInfoUpdateResp(status WifiInfoUpdateRespStatus) *WifiInfoUpdateResp + func (w *WifiInfoUpdateResp) ToBytes() (data []byte) + type WifiInfoUpdateRespStatus int16 + const WifiInfoUpdateRespStatus_CRCError + const WifiInfoUpdateRespStatus_IDMacError + const WifiInfoUpdateRespStatus_NoId + const WifiInfoUpdateRespStatus_Normal + type WifiInfoUpdateUnit interface + Parse func(r io.Reader) (err error) + func NewWifiInfoUpdateUnitByData(r io.Reader) (w WifiInfoUpdateUnit, err error) + type WifiInfoUpdateUnitAP struct + SSID string + func (w *WifiInfoUpdateUnitAP) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitAPConst struct + Channel int8 + DownStream int8 + Id int8 + Mac [6]byte + Rssi int8 + SSIDLen int8 + SecondChannel int8 + UpStream int8 + type WifiInfoUpdateUnitBase struct + Len int8 + Type int8 + type WifiInfoUpdateUnitBegin struct + func (w *WifiInfoUpdateUnitBegin) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitEnd struct + func (w *WifiInfoUpdateUnitEnd) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitProbe struct + Mac [6]byte + Rssi int8 + func (w *WifiInfoUpdateUnitProbe) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitRssi struct + List []*WifiInfoUpdateUnitRssiOne + func (w *WifiInfoUpdateUnitRssi) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitRssiAndStream struct + List []*WifiInfoUpdateUnitRssiAndStreamOne + func (w *WifiInfoUpdateUnitRssiAndStream) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitRssiAndStreamOne struct + DownStread int8 + Id int8 + Rssi int8 + UpStream int8 + VerifyValue int8 + type WifiInfoUpdateUnitRssiOne struct + Id int8 + Rssi int8 + VerifyValue int8 + type WifiInfoUpdateUnitSTA struct + APId int8 + DownStream int8 + Id int8 + Mac [6]byte + Rssi int8 + UpStream int8 + func (w *WifiInfoUpdateUnitSTA) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitStream struct + List []*WifiInfoUpdateUnitStreamOne + func (w *WifiInfoUpdateUnitStream) Parse(r io.Reader) (err error) + type WifiInfoUpdateUnitStreamOne struct + DownStread int8 + Id int8 + UpStream int8 + VerifyValue int8 + type WirelessRange int8 + const WirelessRange_1M + const WirelessRange_20cm + const WirelessRange_3M + const WirelessRange_50cm + const WirelessRange_5M + type WirelessScanBegin struct + Value int8 + type WirelessScanEnd struct + Value int8 + type WirelessScanRangeSet struct + Range WirelessRange + Type WirelessType + type WirelessScanTypeSet struct + TypeList []WirelessType + type WirelessScanUpload struct + ScanCount int8 + ScanList []*WirelessScanUploadOne + type WirelessScanUploadOne struct + DataQuantity int16 + Info int16 + Intensity int8 + ScanData int16 + Type WirelessType + type WirelessType uint8 + const WirelessType_433M_315M + const WirelessType_800M + const WirelessType_All + const WirelessType_CM_3G_TDSCDMA + const WirelessType_CM_4GTDD_LTE + const WirelessType_CM_GSM900_1800 + const WirelessType_CT_4G_FDD_LTE + const WirelessType_CT_CDMA_2000 + const WirelessType_CU_3G_WCDMA + const WirelessType_CU_4GFDD_LTE + const WirelessType_CU_GSM900_1800 + const WirelessType_ISM_2_4G + const WirelessType_WiFi_2_4G