Skip to main content

SmartStation.CreateSmartStationAsync

Description

Creates a new Smart Station with specified NewSmartStation details inside the connected Control Room.

Signature [C#]

Task<SmartStation> CreateSmartStationAsync(NewSmartStation newSmartStation)

Properties

Input

PropertyDescription
NewSmartStationSpecify the details to create new smart station.

Output

PropertyDescription
Task<SmartStation>Returns newly created smartstation details.

Remarks

Use CreateSmartStationAsync API to create new Smart Station with specified NewSmartStation details from the connected Control Room.

Example

C#
public void CreateSmartStation()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");

NewSmartStation newSmartStation = new NewSmartStation()
{
Name = "APISmartStation",
Key = "23374568-24B5-F3D8-5093-CD7B7344C9FH",
Description = "Smart Station"
};

SmartStation smartStation = Task.Run(() => context.Machines.CreateSmartStationAsync(newSmartStation)).Result;
System.Console.WriteLine("SmartStation Name: " + smartStation.Name);
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}