devices

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Id           string `json:"id"`
	Name         string `json:"name"`
	DeviceTypeId string `json:"device_type_id"`
}

type DeviceGroup

type DeviceGroup struct {
	Id        string   `json:"id"`
	Name      string   `json:"name"`
	DeviceIds []string `json:"device_ids"`
}

type DeviceTypeSelectable

type DeviceTypeSelectable struct {
	DeviceTypeId string `json:"device_type_id,omitempty"`
	//Services           []Service                      `json:"services,omitempty"`
	ServicePathOptions map[string][]ServicePathOption `json:"service_path_options,omitempty"`
}

type Devices

type Devices struct {
	// contains filtered or unexported fields
}

func New

func New(deviceRepositoryUrl string) *Devices

func (*Devices) GetDeviceGroup

func (this *Devices) GetDeviceGroup(token auth.Token, groupId string) (result DeviceGroup, err error)

func (*Devices) GetDeviceInfosOfDevices

func (this *Devices) GetDeviceInfosOfDevices(token auth.Token, deviceIds []string) (devices []Device, deviceTypeIds []string, err error)

func (*Devices) GetDeviceInfosOfGroup

func (this *Devices) GetDeviceInfosOfGroup(token auth.Token, groupId string) (devices []Device, deviceTypeIds []string, err error)

func (*Devices) GetDeviceTypeSelectables

func (this *Devices) GetDeviceTypeSelectables(token auth.Token, criteria []FilterCriteria, includeModified bool, servicesMustMatchAllCriteria bool) (result []DeviceTypeSelectable, err error)

func (*Devices) GetDevicesWithIds

func (this *Devices) GetDevicesWithIds(token auth.Token, ids []string) (result []Device, err error)

type FilterCriteria

type FilterCriteria struct {
	Interaction   Interaction `json:"interaction"`
	FunctionId    string      `json:"function_id"`
	DeviceClassId string      `json:"device_class_id"`
	AspectId      string      `json:"aspect_id"`
}

type Interaction

type Interaction string
const (
	EVENT             Interaction = "event"
	REQUEST           Interaction = "request"
	EVENT_AND_REQUEST Interaction = "event+request"
)

type PathOptionsResultElement

type PathOptionsResultElement struct {
	ServiceId              string            `json:"service_id"`
	JsonPath               []string          `json:"json_path"`
	PathToCharacteristicId map[string]string `json:"path_to_characteristic_id"`
}

type ServicePathOption

type ServicePathOption struct {
	ServiceId        string `json:"service_id"`
	Path             string `json:"path"`
	CharacteristicId string `json:"characteristic_id"`
	//AspectNode            AspectNode     `json:"aspect_node"`
	FunctionId            string      `json:"function_id"`
	IsVoid                bool        `json:"is_void"`
	Value                 interface{} `json:"value,omitempty"`
	IsControllingFunction bool        `json:"is_controlling_function"`
}

Jump to

Keyboard shortcuts

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