SimpleDeviceV1 Constructor

Initializes a new instance of the SimpleDeviceV1 class.

Namespace: Gamanet.C4.SimpleInterfaces
Assembly: Gamanet.C4.SimpleInterfaces (in Gamanet.C4.SimpleInterfaces.dll) Version: 2026.0.0.242
Syntax
C#
public SimpleDeviceV1(
	Guid id,
	string name,
	Guid parentId,
	Guid categoryId
)

Parameters

id  Guid
The identifier.
name  String
The name.
parentId  Guid
The parent identifier.
categoryId  Guid
The category identifier.
Remarks

Supported from

  • 2020
  • Example
    The following example illustrates how to create a SimpleDevice object
    C#
    using Gamanet.C4.SDK.Enums.Core;
    using Gamanet.C4.SimpleInterfaces;
    using Gamanet.C4.SDK.Enums.Devices;
    using System;
    
    public class CreateSimpleDevice
    {
        static void Main()
        {
            // create instance of simple device
            var device = new SimpleDevice(
                Guid.NewGuid(), // new Id
                "Mail Sender", // device name
                EntityRoot.Device, // Id of the parent, actually it is device root
                Guid.Parse("7218e1b4-3086-43c7-aecb-5515447ea4bf")); // Id of the device category, this Id is specified by the driver
    
            // all the remaining data is stored in the Data property
            device.Data["Description"] = "This is Mail sender";
            device.Data["FromAddress"] = "test@test.com";
            device.Data["HardwareAddress"] = "00:00:00:00:00:00";
            device.Data["IPAddress"] = "192.168.1.1";
        }
    }
    See Also

    Reference

    SimpleDeviceV1 Class
    Gamanet.C4.SimpleInterfaces Namespace
    EntityRoot