Documentation
¶
Index ¶
- func DurationNsToProto(ts int64) *durationpb.Duration
- func ParseDlDataResult(s string) dlDataResult
- func TimestampNsToProto(ts int64) *timestamppb.Timestamp
- type Att
- type AttCmp
- type AttPrp
- type AttPrpCmp
- type AttPrpRsp
- type AttRsp
- type BasestationMessage
- type BssciError
- type BssciErrorAck
- type Con
- type ConCmp
- type ConRsp
- type Det
- type DetCmp
- type DetPrp
- type DetPrpCmp
- type DetPrpRsp
- type DetRsp
- type DlDataQue
- type DlDataQueCmp
- type DlDataQueRsp
- type DlDataRes
- type DlDataResCmp
- type DlDataResRsp
- type DlDataRev
- type DlDataRevCmp
- type DlDataRevRsp
- type DlRxStat
- type DlRxStatCmp
- type DlRxStatQry
- type DlRxStatQryCmp
- type DlRxStatQryRsp
- type DlRxStatRsp
- type EndnodeMessage
- type GeoLocation
- type Message
- type MessageMsgp
- type Ping
- type PingCmp
- type PingRsp
- type PrpAck
- type ServerMessage
- type Status
- type StatusCmp
- type StatusRsp
- type Subpackets
- type UlData
- type UlDataCmp
- type UlDataRsp
- type UplinkMetadata
- type VmActivate
- type VmActivateCmp
- type VmActivateRsp
- type VmDeactivate
- type VmDeactivateCmp
- type VmDeactivateRsp
- type VmStatus
- type VmStatusCmp
- type VmStatusRsp
- type VmUlData
- type VmUlDataCmp
- type VmUlDataRsp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationNsToProto ¶
func DurationNsToProto(ts int64) *durationpb.Duration
func ParseDlDataResult ¶
func ParseDlDataResult(s string) dlDataResult
func TimestampNsToProto ¶
func TimestampNsToProto(ts int64) *timestamppb.Timestamp
Types ¶
type Att ¶
type Att struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// Unix UTC time of reception, center of last subpacket, 64 bit, ns resolution
RxTime uint64 `msg:"rxTime" json:"rxTime"`
// Duration of the reception, center of first subpacket to center of last subpacket in ns, optional
RxDuration *uint64 `msg:"rxDuration,omitempty" json:"rxDuration,omitempty"`
// End Point attachment counter
AttachCnt uint32 `msg:"attachCnt" json:"attachCnt"`
// Reception signal to noise ratio in dB
SNR float64 `msg:"snr" json:"snr"`
// Reception signal strength in dBm
RSSI float64 `msg:"rssi" json:"rssi"`
// AWGN equivalent reception SNR in dB, optional
EqSnr *float64 `msg:"eqSnr,omitempty" json:"eqSnr,omitempty"`
// Name of the Mioty profile used for reception, i.e. eu1, optional
Profile *string `msg:"profile,omitempty" json:"profile,omitempty"`
// Subpackets object with reception info for every subpacket, optional
Subpackets *Subpackets `msg:"subpackets,omitempty" json:"subpackets,omitempty"`
// End Point nonce
Nonce [4]uint8 `msg:"nonce" json:"nonce"`
// End Point signature
Sign [4]uint8 `msg:"sign" json:"sign"`
// End Point short address, only if assigned by the Base Station
ShAddr *uint16 `msg:"shAddr,omitempty" json:"shAddr,omitempty"`
// True if End Point uses dual channel mode
DualChan bool `msg:"dualChan" json:"dualChan"`
// True if End Point uses DL repetition
Repetition bool `msg:"repetition" json:"repetition"`
// True if End Point uses wide carrier offset
WideCarrOff bool `msg:"wideCarrOff" json:"wideCarrOff"`
// True if End Point uses long DL interblock distance
LongBlkDist bool `msg:"longBlkDist" json:"longBlkDist"`
}
Attach
The attach operation is initiated by the Base Station after receiving an over the air attachment request from an End Point.
Basestation -> Service Center
func NewAtt ¶
func NewAtt( opId int64, epEui common.EUI64, rxTime uint64, rxDuration *uint64, attachCnt uint32, snr float64, rssi float64, eqSnr *float64, profile *string, subpackets *Subpackets, nonce [4]byte, sign [4]byte, shAddr *uint16, dualChan bool, repetition bool, wideCarrOff bool, longBlkDist bool, ) Att
func (*Att) GetCommand ¶
func (*Att) GetEventType ¶
implements EndnodeMessage.GetEventType()
type AttCmp ¶
type AttCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operationF
OpId int64 `msg:"opId" json:"opId"`
}
Attach complete
Basestation -> Service Center
func (*AttCmp) GetCommand ¶
type AttPrp ¶
type AttPrp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// True if End Point is bidirectional
Bidi bool `msg:"bidi" json:"bidi"`
// 16 Byte End Point network session key
NwkSnKey [16]uint8 `msg:"nwkSnKey" json:"nwkSnKey"`
// End Point short address
ShAddr uint16 `msg:"shAddr" json:"shAddr"`
// Last known End Point packet counter
LastPacketCount uint32 `msg:"lastPacketCount" json:"lastPacketCount"`
// True if End Point uses dual channel mode
DualChan bool `msg:"dualChan" json:"dualChan"`
// True if End Point uses DL repetition
Repetition bool `msg:"repetition" json:"repetition"`
// True if End Point uses wide carrier offset
WideCarrOff bool `msg:"wideCarrOff" json:"wideCarrOff"`
// True if End Point uses long DL interblock distance
LongBlkDist bool `msg:"longBlkDist" json:"longBlkDist"`
}
Attach Propagate
The attach propagate operation is initiated by the Service Center to propagate an End Point attachment to the Base Station. The attachment information can either be acquired via an over the air attachment at another Base Station or in the form of an offline preattachment of an End Point (as required for unidirectional End Points).
Service Center -> Basestation
func NewAttPrpFromProto ¶
func NewAttPrpFromProto(opId int64, pb *bs.AttachPropagate) (*AttPrp, error)
func (*AttPrp) GetCommand ¶
type AttPrpCmp ¶
type AttPrpCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Attach propagate complete
Service Center -> Basestation
func NewAttPrpCmp ¶
func (*AttPrpCmp) GetCommand ¶
type AttPrpRsp ¶
type AttPrpRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Attach propagate response
Basestation -> Service Center
func NewAttPrpRsp ¶
func (*AttPrpRsp) GetCommand ¶
type AttRsp ¶
type AttRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point network session key
NwkSnKey [16]uint8 `msg:"nwkSnKey" json:"nwkSnKey"`
// End Point short address, only if not assigned by the Base Station
ShAddr *uint16 `msg:"shAddr,omitempty" json:"shAddr,omitempty"`
}
Attach response
Service Center -> Basestation
func NewAttRspFromProto ¶
func NewAttRspFromProto(opId int64, pb *bs.EndnodeAttachSuccessResponse) (*AttRsp, error)
func (*AttRsp) GetCommand ¶
type BasestationMessage ¶
type BssciError ¶
type BssciError struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// Error code, using POSIX error numbers,
Code uint32 `msg:"code" json:"code"`
// Error message
Message string `msg:"message" json:"message"`
}
Error
An error message might be send in any operation in case of an error condition. The error message terminates the regular operation sequence of initiation, response and completion after either the initiation or the response, depending on where the error condition occurs. In both cases the operation then follows the sequence of error and error acknowledgement instead, with the error acknowledgement completing the operation.
Service Center <-> Basestation
func NewBssciError ¶
func NewBssciError(opId int64, code uint32, message string) BssciError
func (*BssciError) GetCommand ¶
func (m *BssciError) GetCommand() structs.Command
func (*BssciError) GetOpId ¶
func (m *BssciError) GetOpId() int64
type BssciErrorAck ¶
type BssciErrorAck struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Error Ack
Basestation <-> Service Center
func NewBssciErrorAck ¶
func NewBssciErrorAck(opId int64) BssciErrorAck
func (*BssciErrorAck) GetCommand ¶
func (m *BssciErrorAck) GetCommand() structs.Command
func (*BssciErrorAck) GetOpId ¶
func (m *BssciErrorAck) GetOpId() int64
type Con ¶
type Con struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// Requested protocol version, major.minor.patch
Version string `msg:"version" json:"version"`
// Base Station EUI64
BsEui common.EUI64 `msg:"bsEui" json:"bsEui"`
// Vendor of the Base Station, optional
Vendor *string `msg:"vendor,omitempty" json:"vendor,omitempty"`
// Model of the Base Station, optional
Model *string `msg:"model,omitempty" json:"model,omitempty"`
// Name of the Base Station, optional
Name *string `msg:"name,omitempty" json:"name,omitempty"`
// Software version, optional
SwVersion *string `msg:"swVersion,omitempty" json:"swVersion,omitempty"`
// Additional Base Station information object, might contain arbitrary key-value-pairs, optional
Info map[string]any `msg:"info,omitempty" json:"info,omitempty"`
// True if Base Station is bidirectional
Bidi bool `msg:"bidi" json:"bidi"`
// Geographic location [Latitude, Longitude, Altitude], optional
GeoLocation *GeoLocation `msg:"geoLocation,omitempty" json:"geoLocation,omitempty"`
// Base Station session UUID, must match with previous connect to resume session
SnBsUuid structs.SessionUuid `msg:"snBsUuid" json:"snBsUuid"`
// Minimum required known Base Station operation ID to resume previous session, optional
SnBsOpId *int64 `msg:"snBsOpId,omitempty" json:"snBsOpId,omitempty"`
// Maximum known Service Center operation ID to resume previous session, optional
SnScOpId *int64 `msg:"snScOpId,omitempty" json:"snScOpId,omitempty"`
}
Connect
The connect operation is initiated by the Base Station immediately after establishing the network connection with the Service Center. No other operations may be started by either the Base Station or the Service Center until the connect operation is completed. The initial connect operation must use ID 0. This still applies if a previous session shall be resumed.
Basestation -> Service Center
func (*Con) GetCommand ¶
func (*Con) GetEventType ¶
implements BasestationMessage.GetEventType()
type ConCmp ¶
type ConCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Connect complete
Basestation -> Service Center
func (*ConCmp) GetCommand ¶
type ConRsp ¶
type ConRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// Requested protocol version, major.minor.patch
Version string `msg:"version" json:"version"`
// Service Center EUI64
ScEui common.EUI64 `msg:"scEui" json:"scEui"`
// Vendor of the Service Center, optional
Vendor *string `msg:"vendor,omitempty" json:"vendor,omitempty"`
// Model of the Service Center, optional
Model *string `msg:"model,omitempty" json:"model,omitempty"`
// Name of the Service Center, optional
Name *string `msg:"name,omitempty" json:"name,omitempty"`
// Software version, optional
SwVersion *string `msg:"swVersion,omitempty" json:"swVersion,omitempty"`
// Additional Service Center information object, might contain arbitrary key-value-pairs, optional
Info map[string]interface{} `msg:"info,omitempty" json:"info,omitempty"`
// True if a previous session is resumed
SnResume bool `msg:"snResume" json:"snResume"`
// Service Center session UUID, must match with previous connect to resume session
SnScUuid structs.SessionUuid `msg:"snScUuid" json:"snScUuid"`
}
Connect response
Basestation -> Service Center
func (*ConRsp) GetCommand ¶
func (*ConRsp) ResumeConnection ¶
type Det ¶
type Det struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// Unix UTC time of reception, center of last subpacket, 64 bit, ns resolution
RxTime uint64 `msg:"rxTime" json:"rxTime"`
// Duration of the reception, center of first subpacket to center of last subpacket in ns, optional
RxDuration *uint64 `msg:"rxDuration,omitempty" json:"rxDuration,omitempty"`
// End Point packet counter
PacketCnt uint32 `msg:"packetCnt" json:"packetCnt"`
// Reception signal to noise ratio in dB
SNR float64 `msg:"snr" json:"snr"`
// Reception signal strength in dBm
RSSI float64 `msg:"rssi" json:"rssi"`
// AWGN equivalent reception SNR in dB, optional
EqSnr *float64 `msg:"eqSnr,omitempty" json:"eqSnr,omitempty"`
// Name of the Mioty profile used for reception, i.e. eu1, optional
Profile *string `msg:"profile,omitempty" json:"profile,omitempty"`
// Subpackets object with reception info for every subpacket, optional
Subpackets *Subpackets `msg:"subpackets,omitempty" json:"subpackets,omitempty"`
// End Point signature
Sign [4]uint8 `msg:"sign" json:"sign"`
}
Detach
The detach operation is initiated by the Base Station after receiving an over the air detachment request from an End Point.
Basestation -> Service Center
func (*Det) GetCommand ¶
func (*Det) GetEventType ¶
implements EndnodeMessage.GetEventType()
type DetCmp ¶
type DetCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Detach complete
Basestation -> Service Center
func (*DetCmp) GetCommand ¶
type DetPrp ¶
type DetPrp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
}
Detach propagate
Service Center -> Basestation
The detach propagate operation is initiated by the Service Center to propagate an End Point detachment to the Base Station.
func NewDetPrpFromProto ¶
func NewDetPrpFromProto(opId int64, pb *bs.DetachPropagate) (*DetPrp, error)
func (*DetPrp) GetCommand ¶
type DetPrpCmp ¶
type DetPrpCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Detach propagate complete
Service Center -> Basestation
func NewDetPrpCmp ¶
func (*DetPrpCmp) GetCommand ¶
type DetPrpRsp ¶
type DetPrpRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Detach propagate response
Basestation -> Service Center
func NewDetPrpRsp ¶
func (*DetPrpRsp) GetCommand ¶
type DetRsp ¶
type DetRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point signature
Sign [4]byte `msg:"sign" json:"sign"`
}
Detach response
Service Center -> Basestation
func NewDetRspFromProto ¶
func NewDetRspFromProto(opId int64, pb *bs.EndnodeDetachSuccessResponse) (*DetRsp, error)
func (*DetRsp) GetCommand ¶
type DlDataQue ¶
type DlDataQue struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// Assigned queue ID for reference, 64 bit
QueId uint64 `msg:"queId" json:"queId"`
// True if userData is counter dependent
CntDepend bool `msg:"cntDepend" json:"cntDepend"`
// End Point packet counter for which the according userData entry is valid, omitted if cntDepend is false
PacketCnt *[]uint32 `msg:"packetCnt,omitempty" json:"packetCnt,omitempty"`
// End Point user data for each of the m packet counters, single user data entry if cntDepend is false
UserData [][]uint8 `msg:"userData" json:"userData"`
// User data format identifier, 8 bit, optional, default 0
Format *byte `msg:"format,omitempty" json:"format,omitempty"`
// Priority, higher values are prioritized, single precision floating point, optional, default 0
Prio *float32 `msg:"prio,omitempty" json:"prio,omitempty"`
// True to request End Point response, optional
ResponseExp *bool `msg:"responseExp,omitempty" json:"responseExp,omitempty"`
// True to request priority End Point response, optional
ResponsePrio *bool `msg:"responsePrio,omitempty" json:"responsePrio,omitempty"`
// True to request further End Point DL window, optional
DlWindReq *bool `msg:"dlWindReq,omitempty" json:"dlWindReq,omitempty"`
// True to send downlink only if End Point expects a response, optional
ExpOnly *bool `msg:"expOnly,omitempty" json:"expOnly,omitempty"`
}
Downlink data queue
The DL data queue operation is initiated by the Service Center to schedule downlink data at the Base Station for an End Point. This might be done either within the interval between an uplink message and the according downlink window for direct responses or a priority for predefined downlink data.
Counter dependent downlink data (i.e. due to application encryption) must be provided for one or multiple specific packet counters. It can only be transmitted in a downlink window with a matching counter. Only one downlink packet is transmitted for one queue operation, using the first available and suitable downlink window. If user data is empty, a pure acknowledgement downlink is queued.
Service Center -> Basestation
func NewDlDataQue ¶
func NewDlDataQue( opId int64, epEui common.EUI64, queId uint64, prio *float32, format *byte, userData []byte, responseExp *bool, responsePrio *bool, dlWindReq *bool, expOnly *bool, ) DlDataQue
new downlink with unencrypted data
func NewDlDataQueEnc ¶
func NewDlDataQueEnc( opId int64, epEui common.EUI64, queId uint64, prio *float32, format *byte, packetCnt []uint32, userData [][]byte, responseExp *bool, responsePrio *bool, dlWindReq *bool, expOnly *bool, ) DlDataQue
new downlink with encrypted data
length of packetCnt and userData must match, but not checked here
func NewDlDataQueFromProto ¶
func NewDlDataQueFromProto(opId int64, pb *bs.EnqueDownlink) (*DlDataQue, error)
func (*DlDataQue) GetCommand ¶
type DlDataQueCmp ¶
type DlDataQueCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink data queue complete
Service Center -> Basestation
func NewDlDataQueCmp ¶
func NewDlDataQueCmp(opId int64) DlDataQueCmp
func (*DlDataQueCmp) GetCommand ¶
func (m *DlDataQueCmp) GetCommand() structs.Command
func (*DlDataQueCmp) GetOpId ¶
func (m *DlDataQueCmp) GetOpId() int64
type DlDataQueRsp ¶
type DlDataQueRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink data queue response
Basestation -> Service Center
func NewDlDataQueRsp ¶
func NewDlDataQueRsp(opId int64) DlDataQueRsp
func (*DlDataQueRsp) GetCommand ¶
func (m *DlDataQueRsp) GetCommand() structs.Command
func (*DlDataQueRsp) GetOpId ¶
func (m *DlDataQueRsp) GetOpId() int64
type DlDataRes ¶
type DlDataRes struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// Assigned queue ID for reference, 64 bit
QueId uint64 `msg:"queId" json:"queId"`
// sent, expired, invalid
Result dlDataResult `msg:"result" json:"result"`
// Unix UTC time of transmission, center of first subpacket, 64 bit, ns resolution, only if result is sent
TxTime *uint64 `msg:"txTime" json:"txTime"`
// End Point packet counter, only if result is “sent”
PacketCnt *uint32 `msg:"packetCnt" json:"packetCnt"`
}
Downlink data result
The DL data result operation is initiated by the Base Station after queued DL data has either been sent or discarded.
Basestation -> Service Center
func NewDlDataRes ¶
func (*DlDataRes) GetCommand ¶
func (*DlDataRes) GetEventType ¶
implements BasestationMessage.GetEventType()
type DlDataResCmp ¶
type DlDataResCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink data result complete
Basestation -> Service Center
func NewDlDataResCmp ¶
func NewDlDataResCmp(opId int64) DlDataResCmp
func (*DlDataResCmp) GetCommand ¶
func (m *DlDataResCmp) GetCommand() structs.Command
func (*DlDataResCmp) GetOpId ¶
func (m *DlDataResCmp) GetOpId() int64
type DlDataResRsp ¶
type DlDataResRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink data result response
Service Center -> Basestation
func NewDlDataResRsp ¶
func NewDlDataResRsp(opId int64) DlDataResRsp
func (*DlDataResRsp) GetCommand ¶
func (m *DlDataResRsp) GetCommand() structs.Command
func (*DlDataResRsp) GetOpId ¶
func (m *DlDataResRsp) GetOpId() int64
type DlDataRev ¶
type DlDataRev struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// Assigned queue ID for reference, 64 bit
QueId uint64 `msg:"queId" json:"queId"`
}
Downlink data revoke
The DL data revoke operation is initiated by the Service Center to revoke previously scheduled downlink data at the Base Station.
Service Center -> Basestation
func NewDlDataRevFromProto ¶
func NewDlDataRevFromProto(opId int64, pb *bs.RevokeDownlink) (*DlDataRev, error)
func (*DlDataRev) GetCommand ¶
type DlDataRevCmp ¶
type DlDataRevCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink data revoke complete
Service Center -> Basestation
func NewDlDataRevCmp ¶
func NewDlDataRevCmp(opId int64) DlDataRevCmp
func (*DlDataRevCmp) GetCommand ¶
func (m *DlDataRevCmp) GetCommand() structs.Command
func (*DlDataRevCmp) GetOpId ¶
func (m *DlDataRevCmp) GetOpId() int64
type DlDataRevRsp ¶
type DlDataRevRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink data revoke response
Basestation -> Service Center
func NewDlDataRevRsp ¶
func NewDlDataRevRsp(opId int64) DlDataRevRsp
func (*DlDataRevRsp) GetCommand ¶
func (m *DlDataRevRsp) GetCommand() structs.Command
func (*DlDataRevRsp) GetOpId ¶
func (m *DlDataRevRsp) GetOpId() int64
type DlRxStat ¶
type DlRxStat struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// Unix UTC time of reception, center of last subpacket, 64 bit, ns resolution
RxTime uint64 `msg:"rxTime" json:"rxTime"`
// End Point packet counter
PacketCnt uint32 `msg:"packetCnt" json:"packetCnt"`
// End Point DL reception signal to noise ratio in dB
DlRxSnr float64 `msg:"dlRxSnr" json:"dlRxSnr"`
// End Point DL reception signal strength in dBm
DlRxRssi float64 `msg:"dlRxRssi" json:"dlRxRssi"`
}
Downlink RX Status
The DL RX Status operation is initiated by the Base Station after receiving a DL RX status response control segment from an End Point.
Basestation -> Service Center
func NewDlRxStat ¶
func (*DlRxStat) GetCommand ¶
func (*DlRxStat) GetEventType ¶
implements BasestationMessage.GetEventType()
type DlRxStatCmp ¶
type DlRxStatCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink RX Status complete
Basestation -> Service Center
func NewDlRxStatCmp ¶
func NewDlRxStatCmp(opId int64) DlRxStatCmp
func (*DlRxStatCmp) GetCommand ¶
func (m *DlRxStatCmp) GetCommand() structs.Command
func (*DlRxStatCmp) GetOpId ¶
func (m *DlRxStatCmp) GetOpId() int64
type DlRxStatQry ¶
type DlRxStatQry struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
}
Downlink rx status query
The DL RX status query operation is initiated by the Service Center to schedule a DL RX status query control segment for the next downlink transmission of the Base Station to an End Point.
Service Center -> Basestation
func NewDlRxStatQry ¶
func NewDlRxStatQry(opId int64, epEui common.EUI64) DlRxStatQry
func NewDlRxStatQryFromProto ¶
func NewDlRxStatQryFromProto(opId int64, pb *bs.DownlinkRxStatusQuery) (*DlRxStatQry, error)
func (*DlRxStatQry) GetCommand ¶
func (m *DlRxStatQry) GetCommand() structs.Command
func (*DlRxStatQry) GetOpId ¶
func (m *DlRxStatQry) GetOpId() int64
type DlRxStatQryCmp ¶
type DlRxStatQryCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink rx status query complete
Service Center <-> Basestation
func NewDlRxStatQryCmp ¶
func NewDlRxStatQryCmp(opId int64) DlRxStatQryCmp
func (*DlRxStatQryCmp) GetCommand ¶
func (m *DlRxStatQryCmp) GetCommand() structs.Command
func (*DlRxStatQryCmp) GetOpId ¶
func (m *DlRxStatQryCmp) GetOpId() int64
type DlRxStatQryRsp ¶
type DlRxStatQryRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink rx status query response
Basestation <-> Service Center
func NewDlRxStatQryRsp ¶
func NewDlRxStatQryRsp(opId int64) DlRxStatQryRsp
func (*DlRxStatQryRsp) GetCommand ¶
func (m *DlRxStatQryRsp) GetCommand() structs.Command
func (*DlRxStatQryRsp) GetOpId ¶
func (m *DlRxStatQryRsp) GetOpId() int64
type DlRxStatRsp ¶
type DlRxStatRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Downlink RX Status response
Service Center -> Basestation
func NewDlRxStatRsp ¶
func NewDlRxStatRsp(opId int64) DlRxStatRsp
func (*DlRxStatRsp) GetCommand ¶
func (m *DlRxStatRsp) GetCommand() structs.Command
func (*DlRxStatRsp) GetOpId ¶
func (m *DlRxStatRsp) GetOpId() int64
type EndnodeMessage ¶
type GeoLocation ¶
type GeoLocation struct {
Lat float32 `json:"lat"`
Lon float32 `json:"lon"`
Alt float32 `json:"alt"`
}
func (*GeoLocation) IntoProto ¶
func (m *GeoLocation) IntoProto() *common.GeoLocation
type Message ¶
type Message interface {
// get the opId
GetOpId() int64
// get the name of this message type
GetCommand() structs.Command
}
Each message must implement this
type MessageMsgp ¶
type MessageMsgp interface {
Message
// message pack interfaces
msgp.Encodable
msgp.Marshaler
msgp.Unmarshaler
msgp.Decodable
}
Each message must implement this
type Ping ¶
type Ping struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Ping
The ping operation can be initiated by either the Base Station or the Service Center to verify an established connection during idle times where no other operations are initiated.
Service Center <-> Basestation
func (*Ping) GetCommand ¶
type PingCmp ¶
type PingCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Ping complete
Service Center <-> Basestation
func NewPingCmp ¶
func (*PingCmp) GetCommand ¶
type PingRsp ¶
type PingRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Ping response
Basestation <-> Service Center
func NewPingRsp ¶
func (*PingRsp) GetCommand ¶
type PrpAck ¶
type PrpAck struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation (just for compatibility, same as in attPrp/detPrp)
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// True if propagation was successful
Success bool `msg:"dualChan" json:"dualChan"`
// True if attPrp, false if detPrp
Attach bool `msg:"repetition" json:"repetition"`
}
Propagate Acknowledge
Wrapper for attPrpRsp, detPrpRsp or error messages in response to attPrp or detPrp ¶
BSSCI Bridge -> Service Center
func (*PrpAck) GetCommand ¶
func (*PrpAck) GetEventType ¶
implements BasestationMessage.GetEventType()
type ServerMessage ¶
type ServerMessage interface {
MessageMsgp
SetOpId(opId int64)
}
type Status ¶
type Status struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Status
The status operation can be initiated by the Service Center to retrieve status information from the Base Station.
Service Center -> Basestation
func NewStatusFromProto ¶
func NewStatusFromProto(opId int64, pb *bs.RequestStatus) (*Status, error)
func (*Status) GetCommand ¶
type StatusCmp ¶
type StatusCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Status complete
Service Center -> Basestation
func NewStatusCmp ¶
func (*StatusCmp) GetCommand ¶
type StatusRsp ¶
type StatusRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// Status code, using POSIX error numbers, 0 for ok
Code uint32 `msg:"code" json:"code"`
// Status message
Message string `msg:"message" json:"message"`
// Unix UTC system time, 64 bit, ns resolution
Time uint64 `msg:"time" json:"time"`
// Fraction of TX time, sliding window over one hour
DutyCycle float32 `msg:"dutyCycle" json:"dutyCycle"`
// Geographic location [Latitude, Longitude, Altitude], optional
GeoLocation *GeoLocation `msg:"geoLocation,omitempty" json:"geoLocation,omitempty"`
// System uptime in seconds, optional
Uptime *uint64 `msg:"uptime,omitempty" json:"uptime,omitempty"`
// System temperature in degree Celsius, optional
Temp *float64 `msg:"temp,omitempty" json:"temp,omitempty"`
// CPU utilization, normalized to 1.0 for all cores, optional
CpuLoad *float64 `msg:"cpuLoad,omitempty" json:"cpuLoad,omitempty"`
// Memory utilization, normalized to 1.0, optional
MemLoad *float64 `msg:"memLoad,omitempty" json:"memLoad,omitempty"`
// Latency in ms. Time between sending the status request and receiving the message, optional
Latency *int64 `json:"latency,omitempty"`
}
Status response
Basestation -> Service Center
func NewStatusRsp ¶
func (*StatusRsp) GetCommand ¶
func (*StatusRsp) GetEventType ¶
implements BasestationMessage.GetEventType()
func (*StatusRsp) IntoProto ¶
func (m *StatusRsp) IntoProto(bsEui *common.EUI64) *bs.BasestationUplink
implements BasestationMessage.IntoProto()
func (*StatusRsp) SetLatency ¶ added in v0.4.1
type Subpackets ¶
type Subpackets struct {
// Subpacket signal to noise ratio in dB
SNR []int32 `msg:"snr" json:"snr"`
// Subpacket signal strength in dBm
RSSI []int32 `msg:"rssi" json:"rssi"`
// Subpacket frequencies in Hz
Frequency []int32 `msg:"frequency" json:"frequency"`
// Subpacket phases in degree +-180, optional
Phase *[]int32 `msg:"phase,omitempty" json:"phase,omitempty"`
}
Subpackets
reception info for every subpacket
func (*Subpackets) IntoProto ¶
func (subpackets *Subpackets) IntoProto() []*bs.EndnodeUplinkSubpacket
type UlData ¶
type UlData struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// End Point EUI64
EpEui common.EUI64 `msg:"epEui" json:"epEui"`
// Unix UTC time of reception, center of last subpacket, 64 bit, ns resolution
RxTime uint64 `msg:"rxTime" json:"rxTime"`
// Duration of the reception, center of first subpacket to center of last subpacket in ns, optional
RxDuration *uint64 `msg:"rxDuration,omitempty" json:"rxDuration,omitempty"`
// End Point packet counter
PacketCnt uint32 `msg:"packetCnt" json:"packetCnt"`
// Reception signal to noise ratio in dB
SNR float64 `msg:"snr" json:"snr"`
// Reception signal strength in dBm
RSSI float64 `msg:"rssi" json:"rssi"`
// AWGN equivalent reception SNR in dB, optional
EqSnr *float64 `msg:"eqSnr,omitempty" json:"eqSnr,omitempty"`
// Name of the Mioty profile used for reception, i.e. eu1, optional
Profile *string `msg:"profile,omitempty" json:"profile,omitempty"`
// Mioty mode and variant used for reception, i.e. ulp, ulp-rep, ulp-ll, optional
Mode *string `msg:"mode,omitempty" json:"mode,omitempty"`
// Subpackets object with reception info for every subpacket, optional
Subpackets *Subpackets `msg:"subpackets,omitempty" json:"subpackets,omitempty"`
// End Point user data, might be empty
UserData []uint8 `msg:"userData" json:"userData"`
// User data format identifier, 8 bit, optional, default 0
Format *byte `msg:"format,omitempty" json:"format,omitempty"`
// True if End Point downlink window is opened
DlOpen bool `msg:"dlOpen" json:"dlOpen"`
// True if End Point expects a response in the DL window, requires dlOpen
ResponseExp bool `msg:"responseExp" json:"responseExp"`
// True if End Point acknowledges the reception of a DL transmission in the last DL window (packetCnt - 1)
DlAck bool `msg:"dlAck" json:"dlAck"`
}
Uplink data
The UL data operation is initiated by the Base Station after receiving uplink data from an End Point. Telegrams carrying control data exclusively are considered as empty data.
Basestation -> Service Center
func (*UlData) GetCommand ¶
func (*UlData) GetEventType ¶
implements EndnodeMessage.GetEventType()
type UlDataCmp ¶
type UlDataCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
UlDataach complete
Basestation -> Service Center
func NewUlDataCmp ¶
func (*UlDataCmp) GetCommand ¶
type UlDataRsp ¶
type UlDataRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
Uplink data response
Service Center -> Basestation
func NewUlDataRsp ¶
func (*UlDataRsp) GetCommand ¶
type UplinkMetadata ¶
type UplinkMetadata struct {
OpId int64 `json:"opId"`
RxTime uint64 `json:"rxTime"`
RxDuration *uint64 `json:"rxDuration,omitempty"`
PacketCnt uint32 `json:"packetCnt"`
Profile *string `json:"profile,omitempty"`
SNR float64 `json:"snr"`
RSSI float64 `json:"rssi"`
EqSnr *float64 `json:"eqSnr,omitempty"`
Subpackets *Subpackets `json:"subpackets,omitempty"`
}
func NewUplinkMetadata ¶
func NewUplinkMetadata( opId int64, rxTime uint64, rxDuration *uint64, packetCnt uint32, snr float64, rssi float64, eqSnr *float64, profile *string, subpackets *Subpackets, ) UplinkMetadata
func (*UplinkMetadata) IntoProto ¶
func (m *UplinkMetadata) IntoProto() *bs.EndnodeUplinkMetadata
type VmActivate ¶
type VmActivate struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// MAC-Type of the intended Variable MAC
MacType uint32 `msg:"macType" json:"macType"`
}
Activate variable mac support
Service Center -> Basestation
func NewVmActivate ¶
func NewVmActivate(opId int64, macType uint32) VmActivate
func NewVmActivateFromProto ¶
func NewVmActivateFromProto(opId int64, pb *bs.EnableVariableMac) (*VmActivate, error)
func (*VmActivate) GetCommand ¶
func (m *VmActivate) GetCommand() structs.Command
func (*VmActivate) GetOpId ¶
func (m *VmActivate) GetOpId() int64
type VmActivateCmp ¶
type VmActivateCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
VmActivate complete
Service Center -> Basestation
func NewVmActivateCmp ¶
func NewVmActivateCmp(opId int64) VmActivateCmp
func (*VmActivateCmp) GetCommand ¶
func (m *VmActivateCmp) GetCommand() structs.Command
func (*VmActivateCmp) GetOpId ¶
func (m *VmActivateCmp) GetOpId() int64
type VmActivateRsp ¶
type VmActivateRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
VmActivate response
Basestation -> Service Center
func NewVmActivateRsp ¶
func NewVmActivateRsp(opId int64) VmActivateRsp
func (*VmActivateRsp) GetCommand ¶
func (m *VmActivateRsp) GetCommand() structs.Command
func (*VmActivateRsp) GetOpId ¶
func (m *VmActivateRsp) GetOpId() int64
type VmDeactivate ¶
type VmDeactivate struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// MAC-Type of the intended Variable MAC
MacType uint32 `msg:"macType" json:"macType"`
}
Deactivate variable mac support
Service Center -> Basestation
func NewVmDeactivate ¶
func NewVmDeactivate(opId int64, macType uint32) VmDeactivate
func NewVmDeactivateFromProto ¶
func NewVmDeactivateFromProto(opId int64, pb *bs.DisableVariableMac) (*VmDeactivate, error)
func (*VmDeactivate) GetCommand ¶
func (m *VmDeactivate) GetCommand() structs.Command
func (*VmDeactivate) GetOpId ¶
func (m *VmDeactivate) GetOpId() int64
type VmDeactivateCmp ¶
type VmDeactivateCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
VmDeactivate complete
Service Center -> Basestation
func NewVmDeactivateCmp ¶
func NewVmDeactivateCmp(opId int64) VmDeactivateCmp
func (*VmDeactivateCmp) GetCommand ¶
func (m *VmDeactivateCmp) GetCommand() structs.Command
func (*VmDeactivateCmp) GetOpId ¶
func (m *VmDeactivateCmp) GetOpId() int64
type VmDeactivateRsp ¶
type VmDeactivateRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
VmDeactivate response
Basestation -> Service Center
func NewVmDeactivateRsp ¶
func NewVmDeactivateRsp(opId int64) VmDeactivateRsp
func (*VmDeactivateRsp) GetCommand ¶
func (m *VmDeactivateRsp) GetCommand() structs.Command
func (*VmDeactivateRsp) GetOpId ¶
func (m *VmDeactivateRsp) GetOpId() int64
type VmStatus ¶
type VmStatus struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
The VM Status operation delivers a list of the activated MAC-Types.
Service Center -> Basestation
func NewVmStatus ¶
func NewVmStatusFromProto ¶
func NewVmStatusFromProto(opId int64, pb *bs.RequestVariableMacStatus) (*VmStatus, error)
func (*VmStatus) GetCommand ¶
type VmStatusCmp ¶
type VmStatusCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
VmStatus complete
Service Center -> Basestation
func NewVmStatusCmp ¶
func NewVmStatusCmp(opId int64) VmStatusCmp
func (*VmStatusCmp) GetCommand ¶
func (m *VmStatusCmp) GetCommand() structs.Command
func (*VmStatusCmp) GetOpId ¶
func (m *VmStatusCmp) GetOpId() int64
type VmStatusRsp ¶
type VmStatusRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// // List of activated macTypes
MacTypes []int64 `msg:"macTypes" json:"macTypes"`
}
VmStatus response
Basestation -> Service Center
func NewVmStatusRsp ¶
func NewVmStatusRsp(opId int64, macTypes []int64) VmStatusRsp
func (*VmStatusRsp) GetCommand ¶
func (m *VmStatusRsp) GetCommand() structs.Command
func (*VmStatusRsp) GetEventType ¶
func (m *VmStatusRsp) GetEventType() events.EventType
implements BasestationMessage.GetEventType()
func (*VmStatusRsp) GetOpId ¶
func (m *VmStatusRsp) GetOpId() int64
func (*VmStatusRsp) IntoProto ¶
func (m *VmStatusRsp) IntoProto(bsEui *common.EUI64) *bs.BasestationUplink
implements BasestationMessage.IntoProto()
type VmUlData ¶
type VmUlData struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
// MAC-Type of the Variable MAC
MacType uint8 `msg:"macType" json:"macType"`
// n Byte End Point user data U-MPDU; starting with first byte after MAC-Type
UserData []uint8 `msg:"userData" json:"userData"`
// Transceiver time of reception, center of last subpacket, 64 bit, ns resolution
TrxTime uint64 `msg:"trxTime" json:"trxTime"`
// Unix UTC time of reception, center of last subpacket, 64 bit, ns resolution
SysTime uint64 `msg:"sysTime" json:"sysTime"`
// Frequency offset from center between primary and secondary channel in Hz
FreqOff float64 `msg:"freqOff" json:"freqOff"`
// Reception signal to noise ratio in dB
SNR float64 `msg:"snr" json:"snr"`
// Reception signal strength in dBm
RSSI float64 `msg:"rssi" json:"rssi"`
// AWGN equivalent reception SNR in dB, optional
EqSnr *float64 `msg:"eqSnr,omitempty" json:"eqSnr,omitempty"`
// Subpackets object with reception info for every subpacket, optional
Subpackets *Subpackets `msg:"subpackets,omitempty" json:"subpackets,omitempty"`
// Carrier spacing step size Bc, 0 = narrow, 1 = standard, 2 = wide
CarrSpace byte `msg:"carrSpace" json:"carrSpace"`
// Uplink TSMA Pattern group, 0 = normal, 1 = repetition, 2 = low delay
PattGrp byte `msg:"pattGrp" json:"pattGrp"`
// Uplink TSMA Pattern number p
PattNum byte `msg:"pattNum" json:"pattNum"`
// Header and payload CRC, crc[0] = header CRC, crc[1] = payload CRC
CRC [2]uint8 `msg:"crc" json:"crc"`
}
The VM UL data operation is initiated by the Base Station after receiving uplink data from an End Point using a variable MAC (VM)
Basestation -> Service Center
func NewVmUlData ¶
func (*VmUlData) GetCommand ¶
func (*VmUlData) GetEventType ¶
implements EndnodeMessage.GetEventType()
type VmUlDataCmp ¶
type VmUlDataCmp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
VmUlData complete
Basestation -> Service Center
func NewVmUlDataCmp ¶
func NewVmUlDataCmp(opId int64) VmUlDataCmp
func (*VmUlDataCmp) GetCommand ¶
func (m *VmUlDataCmp) GetCommand() structs.Command
func (*VmUlDataCmp) GetOpId ¶
func (m *VmUlDataCmp) GetOpId() int64
type VmUlDataRsp ¶
type VmUlDataRsp struct {
Command structs.Command `msg:"command" json:"command"`
// ID of the operation
OpId int64 `msg:"opId" json:"opId"`
}
VmUlData response
Service Center -> Basestation
func NewVmUlDataRsp ¶
func NewVmUlDataRsp(opId int64) VmUlDataRsp
func (*VmUlDataRsp) GetCommand ¶
func (m *VmUlDataRsp) GetCommand() structs.Command
func (*VmUlDataRsp) GetOpId ¶
func (m *VmUlDataRsp) GetOpId() int64
Source Files
¶
- geo_location.go
- message.go
- msg_att.go
- msg_att_prp.go
- msg_con.go
- msg_det.go
- msg_det_prp.go
- msg_dl_data_que.go
- msg_dl_data_res.go
- msg_dl_data_rev.go
- msg_dl_rx_stat.go
- msg_dl_rx_stat_qry.go
- msg_error.go
- msg_ping.go
- msg_prp_ack.go
- msg_status.go
- msg_ul_data.go
- msg_vm_activate.go
- msg_vm_deactivate.go
- msg_vm_status.go
- msg_vm_ul_data.go
- subpackets.go
- time_util.go
- uplink_metadata.go