Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EventLog represents the event type for console simulation logs. EventLog = "console-sim" // EventError represents an error log event that is emitted to the console. EventError = "console-error" // EventDev is a constant representing the "log-dev" event type used for device logging. EventDev = "log-dev" // EventGw is a string constant representing the "log-gw" event type, typically used for logging gateway-specific messages. EventGw = "log-gw" // EventToggleStateDevice represents an event used to toggle the state of a device. EventToggleStateDevice = "toggleState-dev" // EventToggleStateGateway is a constant representing the event for toggling the state of a gateway. EventToggleStateGateway = "toggleState-gw" // EventSaveStatus represents the event name used to indicate the saving of a status in the system. EventSaveStatus = "save-status" // EventMacCommand represents the event identifier for sending a MAC command to a device. EventMacCommand = "send-MACCommand" // EventResponseCommand is used to indicate a response to a command issued to a device or gateway. EventResponseCommand = "response-command" // EventChangePayload is an event type for signaling a payload change in the system. EventChangePayload = "change-payload" // EventSendUplink represents the event for sending an uplink message in the system. EventSendUplink = "send-uplink" // EventChangeLocation is the constant for the "change-location" event. EventChangeLocation = "change-location" // EventGetParameters is the event name used for requesting regional parameters in the simulation environment. EventGetParameters = "get-regional-parameters" // EventCodecAdded represents the event emitted when a new codec is added to the library. EventCodecAdded = "codec-added" // EventCodecDeleted represents the event emitted when a codec is deleted from the library. EventCodecDeleted = "codec-deleted" // EventCodecUpdated represents the event emitted when a codec is updated. EventCodecUpdated = "codec-updated" // EventIntegrationAdded represents the event emitted when a new integration is added. EventIntegrationAdded = "integration-added" // EventIntegrationDeleted represents the event emitted when an integration is deleted. EventIntegrationDeleted = "integration-deleted" // EventIntegrationUpdated represents the event emitted when an integration is updated. EventIntegrationUpdated = "integration-updated" // EventWatchDev is emitted by the client to start watching a device's logs. EventWatchDev = "watch-dev" // EventUnwatchDev is emitted by the client to stop watching a device's logs. EventUnwatchDev = "unwatch-dev" // EventDevLogHistory is emitted by the server with buffered log history for a watched device. EventDevLogHistory = "dev-log-history" )
Event is a type representing an event that is emitted to the console.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleLog ¶
type ConsoleLog struct {
Name string `json:"name"` // Name specifies the source or identifier of the log entry.
Msg string `json:"message"` // Msg contains the actual log message.
}
ConsoleLog represents a log entry with a name and a message.
type MacCommand ¶
type MacCommand struct {
Id int `json:"id"` // Id is the unique identifier of the MAC command.
CID string `json:"cid"` // CID is the command identifier.
Periodicity uint8 `json:"periodicity"` // Periodicity is the interval at which the command is sent.
}
MacCommand represents a MAC command to be sent to a device in the network.
type NewLocation ¶
type NewLocation struct {
Id int `json:"id"` // Id is the unique identifier of the location.
Latitude float64 `json:"latitude"` // Latitude is the geographical latitude.
Longitude float64 `json:"longitude"` // Longitude is the geographical longitude.
Altitude int32 `json:"altitude"` // Altitude is the height above sea level.
}
NewLocation represents the geographical location of a device.
type NewPayload ¶
type NewPayload struct {
Id int `json:"id"` // Id is the unique identifier of the payload.
MType string `json:"mtype"` // MType is the message type.
Payload string `json:"payload"` // Payload is the actual payload data.
}
NewPayload represents a structure for handling payload changes with ID, message type, and payload data.
type NewStatusDev ¶
type NewStatusDev struct {
DevEUI lorawan.EUI64 `json:"devEUI"` // DevEUI is the unique identifier of the device.
DevAddr lorawan.DevAddr `json:"devAddr"` // DevAddr is the device address.
NwkSKey string `json:"nwkSKey"` // NwkSKey is the network session key.
AppSKey string `json:"appSKey"` // AppSKey is the application session key.
FCntDown uint32 `json:"fcntDown"` // FCntDown is the downlink frame counter.
FCnt uint32 `json:"fcnt"` // FCnt is the uplink frame counter.
}
NewStatusDev represents the status of a device in the network, including identifiers and counters.
Click to show internal directories.
Click to hide internal directories.