package rpc // ConnectionTransport describes what the communication transport is type ConnectionTransport string const ( // ConnectionTransportService is the transport via service ConnectionTransportService ConnectionTransport = "service" // ConnectionTransportCan is the transport via CAN ConnectionTransportCan ConnectionTransport = "can" // ConnectionTransportCP3000 is the transport via CP3000 ConnectionTransportCP3000 ConnectionTransport = "cp3000" // ConnectionTransportXBee is the transport via XBee ConnectionTransportXBee ConnectionTransport = "xbee" // ConnectionTransportCellular is the transport via cellular ConnectionTransportCellular ConnectionTransport = "cellular" // ConnectionTransportLoRa is the transport via LoRa ConnectionTransportLoRa ConnectionTransport = "lora" // ConnectionTransportNBIoT is the transport via NBIoT ConnectionTransportNBIoT ConnectionTransport = "nbiot" ) // ConnectionOperator describes the connection operator type ConnectionOperator string const ( // ConnectionOperatorKPN is the operator KPN ConnectionOperatorKPN ConnectionOperator = "kpn" // ConnectionOperatorTMobile is the operator TMobile ConnectionOperatorTMobile ConnectionOperator = "tmobile" // ConnectionOperatorProximus is the operator Proximus ConnectionOperatorProximus ConnectionOperator = "proximus" // ConnectionOperatorTTN is the operator TTN ConnectionOperatorTTN ConnectionOperator = "ttn" ) // ConnectionInfo is a DI-Net connection info item type ConnectionInfo struct { Timeout uint32 `json:"timeout" msgpack:"timeout"` Gateways []string `json:"gateways" msgpack:"gateways"` Transport ConnectionTransport `json:"transport" msgpack:"transport"` Service *ConnectionInfoService `json:"service,omitempty" msgpack:"service,omitempty"` Can *ConnectionInfoCan `json:"can,omitempty" msgpack:"can,omitempty"` CP3000 *ConnectionInfoCP3000 `json:"cp3000,omitempty" msgpack:"cp3000,omitempty"` XBee *ConnectionInfoXBee `json:"xbee,omitempty" msgpack:"xbee,omitempty"` Cellular *ConnectionInfoCellular `json:"cellular,omitempty" msgpack:"cellular,omitempty"` LoRa *ConnectionInfoLoRa `json:"lora,omitempty" msgpack:"lora,omitempty"` NBIoT *ConnectionInfoNBIoT `json:"nbiot,omitempty" msgpack:"nbiot,omitempty"` } // ConnectionInfoService contains all the service connection information type ConnectionInfoService struct { Endpoint string `json:"endpoint" msgpack:"endpoint"` } // ConnectionInfoCan contains all the connection CAN connection information type ConnectionInfoCan struct { NodeID uint32 `json:"nodeid" msgpack:"nodeid"` } // ConnectionInfoCP3000 contains all the CP3000 connection information type ConnectionInfoCP3000 struct { DatabaseID uint32 `json:"database_id" msgpack:"database_id"` Imsi string `json:"imsi" msgpack:"imsi"` Iccid string `json:"iccid" msgpack:"iccid"` Imei string `json:"imei" msgpack:"imei"` GPRSApn string `json:"gprs_apn" msgpack:"gprs_apn"` Endpoint string `json:"endpoint" msgpack:"endpoint"` } // ConnectionInfoXBee contains all the XBee connection information type ConnectionInfoXBee struct { } // ConnectionInfoCellular contains all the cellular connection information type ConnectionInfoCellular struct { Operator ConnectionOperator `json:"operator" msgpack:"operator"` Imsi string `json:"imsi" msgpack:"imsi"` Iccid string `json:"iccid" msgpack:"iccid"` Imei string `json:"imei" msgpack:"imei"` GPRSApn string `json:"gprs_apn" msgpack:"gprs_apn"` Endpoint string `json:"endpoint" msgpack:"endpoint"` } // ConnectionInfoLoRa contains all the LoRa connection information type ConnectionInfoLoRa struct { DevEUI string `json:"dev_eui" msgpack:"dev_eui"` Operator ConnectionOperator `json:"operator" msgpack:"operator"` } // ConnectionInfoNBIoT contains all the NBIoT connection information type ConnectionInfoNBIoT struct { Imei string `json:"imei" msgpack:"imei"` Operator ConnectionOperator `json:"operator" msgpack:"operator"` }