Click or drag to resize
LegacyTelogisServiceListInputs Method
Print this page
Gets the inputs attached to a given Device in a given Unit .

Namespace: Telogis.API
 
Syntax
public Input[] ListInputs(
	long unitId,
	long deviceId
)

Parameters

unitId
Type: SystemInt64
ID of the unit
deviceId
Type: SystemInt64
ID of the device

Return Value

Type: Input
An array of Input objects representing inputs on the specified Device .
Remarks
Inputs may be either analog or digital and are reported to Verizon Connect Fleet.
Examples
The following code snippet lists devices and inputs available to each device for the first 10 units.
C#
/* Output snippet:
[Truck - Dave]
  -[VCore]
    -[Ignition]=[connected]
    -[Blue Wire]=[connected]
    -[Purple Wire]=[disconnected]*/

// get first 10 Units
Unit[] units = service.ListUnits(0, 10);
foreach (Unit u in units)
{
    Console.WriteLine("[{0}]", u.Name);
    // get all devices connected to this Unit
    Device[] devices = service.ListDevices(u.ID);
    foreach (Device d in devices)
    {
        Console.WriteLine(" -[{0}]", d.Name);
        // get all inputs connected to this Device
        Input[] inputs = service.ListInputs(u.ID, d.ID);
        foreach (Input i in inputs) {
            Console.WriteLine("    -[{0}]=[{1}]", i.Name, i.Connected ? "connected" : "disconnected");
        }
    }
    Console.WriteLine("");
}
See Also