Overview: Before working with Services, the appropriate Service Client must be instantiated and then added to the CreateBuilder in order to be able to access it. This information is an explanation of C# hardware analog and digital IO calls on the OpenPV S50 & S70. It is only intended to provide examples of the syntax used to access services on OpenPV targets. |
Example Service Client Creation Process :
The example below demonstrates instantiating a SystemServiceClient and an IOServiceClient object followed by adding the new objects to the CreateBuilder:
// Instantiate Service Client
SystemServiceClient mySystemServiceClient = new();
// Instantiate IO Service Client
IOServiceClient myIOserviceClient = new();
// ** MUST Use CreateBuilder on the instantiated clients
AhsokaRuntime.CreateBuilder()
.AddClients(mySystemServiceClient, myIOserviceClient)
.StartWithInternalServices();
Comments
0 comments
Please sign in to leave a comment.