pstat

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package pstat implements Device Provisioning Status resource. https://github.com/openconnectivityfoundation/security/blob/master/swagger2.0/oic.sec.pstat.swagger.json

Index

Constants

View Source
const (
	// ResourceType is the resource type of the Device Provisioning Status resource.
	ResourceType = "oic.r.pstat"
	// ResourceURI is the URI of the Device Provisioning Status resource.
	ResourceURI = "/oic/sec/pstat"
)
View Source
const (
	// OperationalState_RESET - Device reset state.
	OperationalState_RESET = OperationalState(0)
	// OperationalState_RFOTM - Ready for Device owner transfer method state.
	OperationalState_RFOTM = OperationalState(1)
	// OperationalState_RFPRO - Ready for Device provisioning state.
	OperationalState_RFPRO = OperationalState(2)
	// OperationalState_RFNOP - Ready for Device normal operation state.
	OperationalState_RFNOP = OperationalState(3)
	// OperationalState_SRESET - The Device is in a soft reset state."
	OperationalState_SRESET = OperationalState(4)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceOnboardingState

type DeviceOnboardingState struct {
	Pending                          bool             `json:"p,omitempty"`
	CurrentOrPendingOperationalState OperationalState `json:"s"`
}

DeviceOnboardingState contains the operation state of the device.

type OperationalMode

type OperationalMode uint8
const (
	OperationalMode_SERVER_DIRECTED_UTILIZING_MULTIPLE_SERVICES OperationalMode = 1 << iota
	OperationalMode_SERVER_DIRECTED_UTILIZING_SINGLE_SERVICE
	OperationalMode_CLIENT_DIRECTED
)

func (OperationalMode) Has

func (m OperationalMode) Has(flag OperationalMode) bool

Has returns true if the flag is set.

func (OperationalMode) String

func (m OperationalMode) String() string

type OperationalState

type OperationalState int

OperationalState represents possible operation states of the device.

func (OperationalState) String

func (s OperationalState) String() string

type ProvisionStatusResponse

type ProvisionStatusResponse struct {
	ResourceOwner             string                `json:"rowneruuid"`
	Interfaces                []string              `json:"if"`
	ResourceTypes             []string              `json:"rt"`
	CurrentOperationalMode    OperationalMode       `json:"om"`
	CurrentProvisioningMode   ProvisioningMode      `json:"cm"`
	Name                      string                `json:"n"`
	InstanceID                string                `json:"id"`
	DeviceIsOperational       bool                  `json:"isop"`
	TargetProvisioningMode    ProvisioningMode      `json:"tm"`
	SupportedOperationalModes OperationalMode       `json:"sm"`
	DeviceOnboardingState     DeviceOnboardingState `json:"dos"`
}

ProvisionStatusResponse contains the supported fields of the Device Provisioning Status resource.

type ProvisionStatusUpdateRequest

type ProvisionStatusUpdateRequest struct {
	ResourceOwner          string                 `json:"rowneruuid,omitempty"`
	CurrentOperationalMode OperationalMode        `json:"om,omitempty"`
	TargetProvisioningMode ProvisioningMode       `json:"tm,omitempty"`
	DeviceOnboardingState  *DeviceOnboardingState `json:"dos,omitempty"`
}

ProvisionStatusUpdateRequest is used to update the Device Provisioning Status resource.

type ProvisioningMode

type ProvisioningMode uint16
const (
	// ProvisioningMode_INIT_SOFT_VER_VALIDATION - Software version validation requested/pending(1), completed(0)
	ProvisioningMode_INIT_SOFT_VER_VALIDATION ProvisioningMode = 1 << 6
	// ProvisioningMode_INIT_SEC_SOFT_UPDATE - Secure software update requested/pending(1), completed(0)
	ProvisioningMode_INIT_SEC_SOFT_UPDATE ProvisioningMode = 1 << 7
)

func (ProvisioningMode) Has

Has returns true if the flag is set.

func (ProvisioningMode) String

func (m ProvisioningMode) String() string

Jump to

Keyboard shortcuts

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