Documentation ¶
Index ¶
- type StorageDriver
- func (driver *StorageDriver) AddDevice(deviceName string, protocols map[string]contract.ProtocolProperties, ...) error
- func (driver *StorageDriver) HandleReadCommands(deviceName string, protocols map[string]contract.ProtocolProperties, ...) ([]*dsModels.CommandValue, error)
- func (driver *StorageDriver) HandleWriteCommands(deviceName string, protocols map[string]contract.ProtocolProperties, ...) error
- func (driver *StorageDriver) Initialize(logger logger.LoggingClient, asyncValues chan<- *dsModels.AsyncValues, ...) error
- func (driver *StorageDriver) RemoveDevice(deviceName string, protocols map[string]contract.ProtocolProperties) error
- func (driver *StorageDriver) Stop(force bool) error
- func (driver *StorageDriver) UpdateDevice(deviceName string, protocols map[string]contract.ProtocolProperties, ...) error
- type StorageHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageDriver ¶
type StorageDriver struct {
// contains filtered or unexported fields
}
func (*StorageDriver) AddDevice ¶
func (driver *StorageDriver) AddDevice(deviceName string, protocols map[string]contract.ProtocolProperties, adminState contract.AdminState) error
when a new Device associated with this Device Service is added
func (*StorageDriver) HandleReadCommands ¶
func (driver *StorageDriver) HandleReadCommands(deviceName string, protocols map[string]contract.ProtocolProperties, reqs []dsModels.CommandRequest) ([]*dsModels.CommandValue, error)
HandleReadCommands triggers a protocol Read operation for the specified device.
func (*StorageDriver) HandleWriteCommands ¶
func (driver *StorageDriver) HandleWriteCommands(deviceName string, protocols map[string]contract.ProtocolProperties, reqs []dsModels.CommandRequest, params []*dsModels.CommandValue) error
HandleWriteCommands passes a slice of CommandRequest
func (*StorageDriver) Initialize ¶
func (driver *StorageDriver) Initialize(logger logger.LoggingClient, asyncValues chan<- *dsModels.AsyncValues, deviceCh chan<- []dsModels.DiscoveredDevice) error
Initialize performs protocol-specific initialization for the device
func (*StorageDriver) RemoveDevice ¶
func (driver *StorageDriver) RemoveDevice(deviceName string, protocols map[string]contract.ProtocolProperties) error
when a Device associated with this Device Service is removed
func (*StorageDriver) Stop ¶
func (driver *StorageDriver) Stop(force bool) error
Stop the protocol-specific DS code to shutdown gracefully
func (*StorageDriver) UpdateDevice ¶
func (driver *StorageDriver) UpdateDevice(deviceName string, protocols map[string]contract.ProtocolProperties, adminState contract.AdminState) error
when a Device associated with this Device Service is updated
type StorageHandler ¶
type StorageHandler struct {
// contains filtered or unexported fields
}
func NewStorageHandler ¶
func NewStorageHandler(service *sdk.DeviceService, logger logger.LoggingClient, asyncValues chan<- *models.AsyncValues) *StorageHandler
func (StorageHandler) Start ¶
func (handler StorageHandler) Start() error
Click to show internal directories.
Click to hide internal directories.