messages

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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 (m *Att) GetCommand() structs.Command

func (*Att) GetEventType

func (m *Att) GetEventType() events.EventType

implements EndnodeMessage.GetEventType()

func (*Att) GetOpId

func (m *Att) GetOpId() int64

func (*Att) IntoProto

func (m *Att) IntoProto(bsEui *common.EUI64) *bs.EndnodeUplink

implements EndnodeMessage.IntoProto()

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 NewAttCmp

func NewAttCmp(opId int64) AttCmp

func (*AttCmp) GetCommand

func (m *AttCmp) GetCommand() structs.Command

func (*AttCmp) GetOpId

func (m *AttCmp) GetOpId() int64

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 NewAttPrp

func NewAttPrp(opId int64, epEui common.EUI64, bidi bool, nwkSnKey [16]byte, shAddr uint16, lastPacketCount uint32, dualChan bool, repetition bool, wideCarrOff bool, longBlkDist bool,
) AttPrp

func NewAttPrpFromProto

func NewAttPrpFromProto(opId int64, pb *bs.AttachPropagate) (*AttPrp, error)

func (*AttPrp) GetCommand

func (m *AttPrp) GetCommand() structs.Command

func (*AttPrp) GetOpId

func (m *AttPrp) GetOpId() int64

func (*AttPrp) SetOpId

func (m *AttPrp) SetOpId(opId int64)

implements ServerMessage

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 NewAttPrpCmp(opId int64) AttPrpCmp

func (*AttPrpCmp) GetCommand

func (m *AttPrpCmp) GetCommand() structs.Command

func (*AttPrpCmp) GetOpId

func (m *AttPrpCmp) GetOpId() int64

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 NewAttPrpRsp(opId int64) AttPrpRsp

func (*AttPrpRsp) GetCommand

func (m *AttPrpRsp) GetCommand() structs.Command

func (*AttPrpRsp) GetOpId

func (m *AttPrpRsp) GetOpId() int64

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 NewAttRsp

func NewAttRsp(opId int64, nwkSnKey [16]byte, shAddr *uint16) AttRsp

func NewAttRspFromProto

func NewAttRspFromProto(opId int64, pb *bs.EndnodeAttachSuccessResponse) (*AttRsp, error)

func (*AttRsp) GetCommand

func (m *AttRsp) GetCommand() structs.Command

func (*AttRsp) GetOpId

func (m *AttRsp) GetOpId() int64

type BasestationMessage

type BasestationMessage interface {
	Message
	GetEventType() events.EventType
	IntoProto(bsEui *common.EUI64) *bs.BasestationUplink
}

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 (m *Con) GetCommand() structs.Command

func (*Con) GetEui

func (m *Con) GetEui() common.EUI64

func (*Con) GetEventType

func (m *Con) GetEventType() events.EventType

implements BasestationMessage.GetEventType()

func (*Con) GetOpId

func (m *Con) GetOpId() int64

func (*Con) IntoProto

func (m *Con) IntoProto(bsEui *common.EUI64) *bs.BasestationUplink

implements BasestationMessage.IntoProto()

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 NewConCmp

func NewConCmp(opId int64) ConCmp

func (*ConCmp) GetCommand

func (m *ConCmp) GetCommand() structs.Command

func (*ConCmp) GetOpId

func (m *ConCmp) GetOpId() int64

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 NewConRsp

func NewConRsp(opId int64, version string, snScUuid uuid.UUID) ConRsp

func (*ConRsp) GetCommand

func (m *ConRsp) GetCommand() structs.Command

func (*ConRsp) GetOpId

func (m *ConRsp) GetOpId() int64

func (*ConRsp) ResumeConnection

func (m *ConRsp) ResumeConnection(snScUuid uuid.UUID)

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 NewDet

func NewDet(
	opId int64,
	epEui common.EUI64,
	rxTime uint64,
	rxDuration *uint64,
	packetCnt uint32,
	snr float64,
	rssi float64,
	eqSnr *float64,
	profile *string,
	subpackets *Subpackets,
	sign [4]byte,
) Det

func (*Det) GetCommand

func (m *Det) GetCommand() structs.Command

func (*Det) GetEventType

func (m *Det) GetEventType() events.EventType

implements EndnodeMessage.GetEventType()

func (*Det) GetOpId

func (m *Det) GetOpId() int64

func (*Det) IntoProto

func (m *Det) IntoProto(bsEui *common.EUI64) *bs.EndnodeUplink

implements EndnodeMessage.IntoProto()

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 NewDetCmp

func NewDetCmp(opId int64) DetCmp

func (*DetCmp) GetCommand

func (m *DetCmp) GetCommand() structs.Command

func (*DetCmp) GetOpId

func (m *DetCmp) GetOpId() int64

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 NewDetPrp

func NewDetPrp(
	opId int64,
	epEui common.EUI64,
) DetPrp

func NewDetPrpFromProto

func NewDetPrpFromProto(opId int64, pb *bs.DetachPropagate) (*DetPrp, error)

func (*DetPrp) GetCommand

func (m *DetPrp) GetCommand() structs.Command

func (*DetPrp) GetOpId

func (m *DetPrp) GetOpId() int64

func (*DetPrp) SetOpId

func (m *DetPrp) SetOpId(opId int64)

implements ServerMessage

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 NewDetPrpCmp(opId int64) DetPrpCmp

func (*DetPrpCmp) GetCommand

func (m *DetPrpCmp) GetCommand() structs.Command

func (*DetPrpCmp) GetOpId

func (m *DetPrpCmp) GetOpId() int64

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 NewDetPrpRsp(opId int64) DetPrpRsp

func (*DetPrpRsp) GetCommand

func (m *DetPrpRsp) GetCommand() structs.Command

func (*DetPrpRsp) GetOpId

func (m *DetPrpRsp) GetOpId() int64

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 NewDetRsp

func NewDetRsp(opId int64, sign [4]byte) DetRsp

func NewDetRspFromProto

func NewDetRspFromProto(opId int64, pb *bs.EndnodeDetachSuccessResponse) (*DetRsp, error)

func (*DetRsp) GetCommand

func (m *DetRsp) GetCommand() structs.Command

func (*DetRsp) GetOpId

func (m *DetRsp) GetOpId() int64

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

func (m *DlDataQue) GetCommand() structs.Command

func (*DlDataQue) GetOpId

func (m *DlDataQue) GetOpId() int64

func (*DlDataQue) SetOpId

func (m *DlDataQue) SetOpId(opId int64)

implements ServerMessage

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 NewDlDataRes(
	opId int64,
	epEui common.EUI64,
	queId uint64,
	result dlDataResult,
	txTime *uint64,
	packetCnt *uint32,
) DlDataRes

func (*DlDataRes) GetCommand

func (m *DlDataRes) GetCommand() structs.Command

func (*DlDataRes) GetEventType

func (m *DlDataRes) GetEventType() events.EventType

implements BasestationMessage.GetEventType()

func (*DlDataRes) GetOpId

func (m *DlDataRes) GetOpId() int64

func (*DlDataRes) IntoProto

func (m *DlDataRes) IntoProto(bsEui *common.EUI64) *bs.BasestationUplink

implements BasestationMessage.IntoProto()

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 NewDlDataRev

func NewDlDataRev(
	opId int64,
	epEui common.EUI64,
	queId uint64,
) DlDataRev

func NewDlDataRevFromProto

func NewDlDataRevFromProto(opId int64, pb *bs.RevokeDownlink) (*DlDataRev, error)

func (*DlDataRev) GetCommand

func (m *DlDataRev) GetCommand() structs.Command

func (*DlDataRev) GetOpId

func (m *DlDataRev) GetOpId() int64

func (*DlDataRev) SetOpId

func (m *DlDataRev) SetOpId(opId int64)

implements ServerMessage

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 NewDlRxStat(
	opId int64,
	epEui common.EUI64,
	result string,
	rxTime uint64,
	packetCnt uint32,
	dlRxSnr float64,
	dlRxRssi float64,
) DlRxStat

func (*DlRxStat) GetCommand

func (m *DlRxStat) GetCommand() structs.Command

func (*DlRxStat) GetEventType

func (m *DlRxStat) GetEventType() events.EventType

implements BasestationMessage.GetEventType()

func (*DlRxStat) GetOpId

func (m *DlRxStat) GetOpId() int64

func (*DlRxStat) IntoProto

func (m *DlRxStat) IntoProto(bsEui *common.EUI64) *bs.BasestationUplink

implements BasestationMessage.IntoProto()

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

func (*DlRxStatQry) SetOpId

func (m *DlRxStatQry) SetOpId(opId int64)

implements ServerMessage

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 EndnodeMessage interface {
	Message
	GetEventType() events.EventType
	IntoProto(bsEui *common.EUI64) *bs.EndnodeUplink
}

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 NewPing

func NewPing(opId int64) Ping

func (*Ping) GetCommand

func (m *Ping) GetCommand() structs.Command

func (*Ping) GetOpId

func (m *Ping) GetOpId() int64

func (*Ping) SetOpId

func (m *Ping) SetOpId(opId int64)

implements ServerMessage

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 NewPingCmp(opId int64) PingCmp

func (*PingCmp) GetCommand

func (m *PingCmp) GetCommand() structs.Command

func (*PingCmp) GetOpId

func (m *PingCmp) GetOpId() int64

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 NewPingRsp(opId int64) PingRsp

func (*PingRsp) GetCommand

func (m *PingRsp) GetCommand() structs.Command

func (*PingRsp) GetOpId

func (m *PingRsp) GetOpId() int64

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 NewPrpAck

func NewPrpAck(opId int64, epEui common.EUI64, success bool, attach bool,
) PrpAck

func (*PrpAck) GetCommand

func (m *PrpAck) GetCommand() structs.Command

func (*PrpAck) GetEventType

func (m *PrpAck) GetEventType() events.EventType

implements BasestationMessage.GetEventType()

func (*PrpAck) GetOpId

func (m *PrpAck) GetOpId() int64

func (*PrpAck) IntoProto

func (m *PrpAck) IntoProto(bsEui *common.EUI64) *bs.BasestationUplink

implements BasestationMessage.IntoProto()

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 NewStatus

func NewStatus(opId int64) Status

func NewStatusFromProto

func NewStatusFromProto(opId int64, pb *bs.RequestStatus) (*Status, error)

func (*Status) GetCommand

func (m *Status) GetCommand() structs.Command

func (*Status) GetOpId

func (m *Status) GetOpId() int64

func (*Status) SetOpId

func (m *Status) SetOpId(opId int64)

implements ServerMessage

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 NewStatusCmp(opId int64) StatusCmp

func (*StatusCmp) GetCommand

func (m *StatusCmp) GetCommand() structs.Command

func (*StatusCmp) GetOpId

func (m *StatusCmp) GetOpId() int64

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 NewStatusRsp(opId int64, code uint32, message string, time uint64, dutyCycle float32, geoLocation *GeoLocation, uptime *uint64, temp *float64, cpuLoad *float64, memLoad *float64, latency *int64) StatusRsp

func (*StatusRsp) GetCommand

func (m *StatusRsp) GetCommand() structs.Command

func (*StatusRsp) GetEventType

func (m *StatusRsp) GetEventType() events.EventType

implements BasestationMessage.GetEventType()

func (*StatusRsp) GetOpId

func (m *StatusRsp) GetOpId() int64

func (*StatusRsp) IntoProto

func (m *StatusRsp) IntoProto(bsEui *common.EUI64) *bs.BasestationUplink

implements BasestationMessage.IntoProto()

func (*StatusRsp) SetLatency added in v0.4.1

func (m *StatusRsp) SetLatency(latency *int64)

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 NewUlData

func NewUlData(
	opId int64,
	epEui common.EUI64,
	rxTime uint64,
	rxDuration *uint64,
	packetCnt uint32,
	snr float64,
	rssi float64,
	eqSnr *float64,
	profile *string,
	mode *string,
	subpackets *Subpackets,
	userData []byte,
	format *byte,
	dlOpen bool,
	responseExp bool,
	dlAck bool,
) UlData

func (*UlData) GetCommand

func (m *UlData) GetCommand() structs.Command

func (*UlData) GetEventType

func (m *UlData) GetEventType() events.EventType

implements EndnodeMessage.GetEventType()

func (*UlData) GetOpId

func (m *UlData) GetOpId() int64

func (*UlData) IntoProto

func (m *UlData) IntoProto(bsEui *common.EUI64) *bs.EndnodeUplink

implements EndnodeMessage.IntoProto()

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 NewUlDataCmp(opId int64) UlDataCmp

func (*UlDataCmp) GetCommand

func (m *UlDataCmp) GetCommand() structs.Command

func (*UlDataCmp) GetOpId

func (m *UlDataCmp) GetOpId() int64

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 NewUlDataRsp(opId int64) UlDataRsp

func (*UlDataRsp) GetCommand

func (m *UlDataRsp) GetCommand() structs.Command

func (*UlDataRsp) GetOpId

func (m *UlDataRsp) GetOpId() int64

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

func (*VmActivate) SetOpId

func (m *VmActivate) SetOpId(opId int64)

implements ServerMessage

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

func (*VmDeactivate) SetOpId

func (m *VmDeactivate) SetOpId(opId int64)

implements ServerMessage

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 NewVmStatus(opId int64) VmStatus

func NewVmStatusFromProto

func NewVmStatusFromProto(opId int64, pb *bs.RequestVariableMacStatus) (*VmStatus, error)

func (*VmStatus) GetCommand

func (m *VmStatus) GetCommand() structs.Command

func (*VmStatus) GetOpId

func (m *VmStatus) GetOpId() int64

func (*VmStatus) SetOpId

func (m *VmStatus) SetOpId(opId int64)

implements ServerMessage

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 NewVmUlData(
	opId int64,
	macType uint8,
	userData []byte,
	trxTime uint64,
	freqOff float64,
	snr float64,
	rssi float64,
	eqSnr *float64,
	subpackets *Subpackets,
	carrSpace byte,
	pattGrp byte,
	pattNum byte,
	crc [2]byte,

) VmUlData

func (*VmUlData) GetCommand

func (m *VmUlData) GetCommand() structs.Command

func (*VmUlData) GetEventType

func (m *VmUlData) GetEventType() events.EventType

implements EndnodeMessage.GetEventType()

func (*VmUlData) GetOpId

func (m *VmUlData) GetOpId() int64

func (*VmUlData) IntoProto

func (m *VmUlData) IntoProto(bsEui *common.EUI64) *bs.EndnodeUplink

implements EndnodeMessage.IntoProto()

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL