Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct {
// contains filtered or unexported fields
}
Deployments defines the FUOTA deployment struct.
func NewDeployment ¶
func NewDeployment(opts DeploymentOptions) (*Deployment, error)
NewDeployment creates a new Deployment.
func (*Deployment) GetID ¶
func (d *Deployment) GetID() uuid.UUID
GetID returns the random assigned FUOTA deployment ID.
func (*Deployment) HandleUplinkEvent ¶
func (d *Deployment) HandleUplinkEvent(ctx context.Context, pl integration.UplinkEvent) error
HandleUplinkEvent handles the given uplink event. In case it does not match one of the FUOTA ports or DevEUI within the deployment, the uplink is silently discarded.
type DeploymentOptions ¶
type DeploymentOptions struct { // The application id. ApplicationID int64 // The Devices to include in the update. // Note: the devices must be part of the above application id. Devices map[lorawan.EUI64]DeviceOptions // MulticastGroupType defines the multicast type (B/C) MulticastGroupType api.MulticastGroupType // Multicast DR defines the multicast data-rate. MulticastDR uint8 // MulticastPingSlotPeriod defines the ping-slot period (Class-B). MulticastPingSlotPeriod uint8 // MulticastFrequency defines the frequency. MulticastFrequency uint32 // MulticastGroupID defines the multicast group ID. MulticastGroupID uint8 // MulticastTimeout defines the timeout of the multicast-session. // Please refer to the Remote Multicast Setup specification as this field // has a different meaning for Class-B and Class-C groups. MulticastTimeout uint8 // UnicastTimeout. // Set this to the value in which you at least expect an uplink frame from // the device. The FUOTA server will wait for the given time before // attempting a retry or continuing with the next step. UnicastTimeout time.Duration // UnicastAttemptCount. // The number of attempts before considering an unicast command // to be failed. UnicastAttemptCount int // FragSize defines the max size for each payload fragment. FragSize int // Payload defines the FUOTA payload. Payload []byte // Redundancy (in number of packets). Redundancy int // FragmentationSessionIndex. FragmentationSessionIndex uint8 // FragmentationMatrix. FragmentationMatrix uint8 // BlockAckDelay. BlockAckDelay uint8 // Descriptor. Descriptor [4]byte // RequestFragmentationSessionStatus defines if and when the frag-session // status must be requested. RequestFragmentationSessionStatus FragmentationSessionStatusRequestType }
DeploymentOptions defines the options for a FUOTA Deployment.
type DeviceOptions ¶
type DeviceOptions struct { // McRootKey holds the McRootKey. // Note: please refer to the Remote Multicast Setup specification for more // information (page 10). McRootKey lorawan.AES128Key }
DeviceOptions holds the device options.
type FragmentationSessionStatusRequestType ¶
type FragmentationSessionStatusRequestType string
FragmentationSessionStatusRequestType type.
const ( RequestFragmentationSessionStatusAfterFragmentEnqueue FragmentationSessionStatusRequestType = "AFTER_FRAGMENT_ENQUEUE" RequestFragmentationSessionStatusAfterSessionTimeout FragmentationSessionStatusRequestType = "AFTER_SESSION_TIMEOUT" RequestFragmentationSessionStatusNoRequest FragmentationSessionStatusRequestType = "NO_REQUEST" )
RequestFragmentationSessionStatus options.
Click to show internal directories.
Click to hide internal directories.