dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/clients/interfaces/deviceservicecommand.go (about)

     1  //
     2  // Copyright (C) 2021 IOTech Ltd
     3  //
     4  // SPDX-License-Identifier: Apache-2.0
     5  
     6  package interfaces
     7  
     8  import (
     9  	"context"
    10  
    11  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/common"
    12  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/dtos/responses"
    13  	"dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/errors"
    14  )
    15  
    16  // DeviceServiceCommandClient defines the interface for interactions with the device command endpoints on the EdgeX Foundry device services.
    17  type DeviceServiceCommandClient interface {
    18  	// GetCommand invokes device service's command API for issuing get(read) command
    19  	GetCommand(ctx context.Context, baseUrl string, deviceName string, commandName string, queryParams string) (*responses.EventResponse, errors.EdgeX)
    20  	// SetCommand invokes device service's command API for issuing set(write) command
    21  	SetCommand(ctx context.Context, baseUrl string, deviceName string, commandName string, queryParams string, settings map[string]string) (common.BaseResponse, errors.EdgeX)
    22  	// SetCommandWithObject invokes device service's set command API and the settings supports object value type
    23  	SetCommandWithObject(ctx context.Context, baseUrl string, deviceName string, commandName string, queryParams string, settings map[string]interface{}) (common.BaseResponse, errors.EdgeX)
    24  }