generated from thinkode/modelRepository
peripheral setting save
This commit is contained in:
@@ -17,8 +17,8 @@ type OS2LPeripheral struct {
|
||||
func NewOS2LPeripheral(name string, serialNumber string) *OS2LPeripheral {
|
||||
log.Trace().Str("file", "OS2LPeripheral").Str("name", name).Str("s/n", serialNumber).Msg("OS2L peripheral created")
|
||||
settings := make(map[string]interface{})
|
||||
settings["ip"] = "192.168.1.1"
|
||||
settings["port"] = 9995
|
||||
settings["os2lIpSetting"] = "192.168.1.1"
|
||||
settings["os2lPortSetting"] = 9995
|
||||
return &OS2LPeripheral{
|
||||
name: name,
|
||||
serialNumber: serialNumber,
|
||||
@@ -50,6 +50,12 @@ func (p *OS2LPeripheral) Deactivate(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetPeripheralSetting sets a specific setting for this peripheral
|
||||
func (p *OS2LPeripheral) SetPeripheralSetting(settingName string, settingValue interface{}) error {
|
||||
p.settings[settingName] = settingValue
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetDeviceProperty - not implemented for this kind of peripheral
|
||||
func (p *OS2LPeripheral) SetDeviceProperty(context.Context, uint32, uint32, byte) error {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user