ActivePortItem

Describes the an Active Communication Port to which downstream devices are connected.

The active Port on a Controller is used to communicate with downstreams and must be configured before use.

ActivePortItem Properties

ActivePortItem

Field Type Inherited from Description
BaudRate Int32 ActivePortItem Sets maximum BaudRate for the portUsed only for RS485 communication ports
DriverNumber Int32 ActivePortItem Used to identify which port is being used.Retrieve the list of Communication ports from the controller, and then select the specific port by Driver Number

JSON Structure of ActivePortItem

{
   "BaudRate"	:	"Int32",
   "DriverNumber"	:	"Int32"
}

Get Active Ports Async

Example in C#

// Returns: IEnumerable<ActivePortItem>
var activePortItem = await client.GetActivePortsAsync(ControllerInfo controller)

Example in CURL



           curl -X GET \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/controllers/CONTROLLER.KEY/activeports \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' 
            

Set Active Port Async

Example in C#

// Returns: T
var item = await client.SetActivePortAsync<T>(T controller, ActivePortItem activePortItem)

Example in CURL



           curl -X PUT \
               https://keepapi.feenicshosting.com/api/f/INSTANCE.KEY/controllers/CONTROLLERS.KEY/activeports \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -D '{
                       "$type":"Feenics.Keep.WebApi.Model.ActivePortItem, Feenics.Keep.WebApi.Model",
                       "DriverNumber":0,
                       "BaudRate":0
                   }'