DeviceRepositoryV3.GetAllChildrenSupportCommand Method

Get Devices which support command

Namespace: Gamanet.C4.SDK
Assembly: Gamanet.C4.SimpleClient (in Gamanet.C4.SimpleClient.dll) Version: 2026.0.0.733
Syntax
C#
public ISimpleCollection<SimpleDeviceV1> GetAllChildrenSupportCommand(
	Guid deviceId,
	Guid commandCategoryId
)

Parameters

deviceId  Guid
The device identifier.
commandCategoryId  Guid
The command identifier.

Return Value

ISimpleCollection<SimpleDeviceV1>
Collection of devices

Implements

ISimpleClientDeviceRepositoryV3.GetAllChildrenSupportCommand(Guid, Guid)
Example
The following example illustrates how SimpleClient filter device by command category
C#
using System;
using Gamanet.C4.SDK;
using Gamanet.C4.SimpleInterfaces;

public class Example
{
    static void Main()
    {
        // Create instance of simple client
        var client = new SimpleClient(ConnectorConfiguration.HttpClient);

        ConnectionInfoV1 token;
        // Connect to local server
        var connectionResult = client.Connect(new Uri("https://localhost/"), "Support", "support", out token);

        if (connectionResult != ConnectionResult.Successful)
        {
            Console.WriteLine("Connection unsuccessful, result: {0}", connectionResult);
            return;
        }

        Console.WriteLine("Connection result: {0}", connectionResult);
        Console.WriteLine();

        // Create the Example Device (Bus Controller)
        var exampleBusController = new SimpleDeviceV1(
            Guid.NewGuid(),
            "BUS",
            EntityRoot.Device,
            Guid.Parse("9c2246aa-5d43-414f-85d4-8c3b4e657236")
        );

        // Create the Example Device (Panel)
        var examplePanel = new SimpleDeviceV1(
            Guid.NewGuid(),
            "PANEL",
            exampleBusController.Id,
            Guid.Parse("a7395726-1e7f-4c1e-bdef-ce28a869620a")
        );

        // Create the Example Device (Door)
        var exampleDoor = new SimpleDeviceV1(
            Guid.NewGuid(),
            "DOOR",
            examplePanel.Id,
            Guid.Parse("8b87ea62-9a72-4126-b054-3f8ad0683bf1")
        );
        // Create devices in db
        client.Devices.Create(exampleBusController);
        client.Devices.Create(examplePanel);
        client.Devices.Create(exampleDoor);

        // Example command category ID
        var exampleCommandCategoryId = Guid.Parse("CBF63C59-7DA3-4824-9D4B-0793CBFDAB75");

        var resultExample = client.Devices.GetAllChildrenSupportCommand(exampleBusController.Id, exampleCommandCategoryId);

        foreach ( var child in resultExample)
        {
            Console.WriteLine(child.Name);
        }

        // Disconnect from server
        client.Disconnect();
    }
}
See Also

Reference

DeviceRepositoryV3 Class
Gamanet.C4.SDK Namespace