Esempio n. 1
0
 private static void EnableOperationModeEdl40(string portName, SmlComServiceClient proxy, Guid clientGuid, DateTime newTime)
 {
     Console.WriteLine("Enabling EDL40 mode with new meter time: " + newTime);
     proxy.EnableOperationModeEdl40(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName), newTime);
     var booleanResult = proxy.ReadIsOperationModeEdl40(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName));
     Console.WriteLine("Operation mode read: " + Stringify(booleanResult));
     var meterTimeResult = proxy.ReadDateAndTime(
        clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName));
     Console.WriteLine("Meter time read: " + Stringify(meterTimeResult));
     Console.WriteLine();
 }
Esempio n. 2
0
 private static async Task EnableOperationModeEdl40(string portName, SmlComServiceClient proxy, Guid clientGuid, int hostOffset)
 {
     Console.WriteLine();
     Console.WriteLine("{0} - Enabling EDL40 mode with host offset: {1}.", portName, hostOffset);
     proxy.EnableOperationModeEdl40WithHostOffset(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName), hostOffset);
     var booleanResult = proxy.ReadIsOperationModeEdl40(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName));
     //Console.WriteLine("Operation mode read: " + Stringify(booleanResult));
     var meterTimeResult = proxy.ReadDateAndTime(
        clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName));
     Console.WriteLine("{0} - Meter time read: {1}", portName, Stringify(meterTimeResult));
     Console.WriteLine();
 }
Esempio n. 3
0
 /// <summary>
 /// Sets the operation mode.
 /// </summary>
 /// <param name="portlist">The portlist.</param>
 /// <param name="proxy">The proxy.</param>
 /// <param name="clientGuid">The client GUID.</param>
 /// <param name="operationMode">if set to <c>true</c> [operation mode].</param>
 private static void WriteOperationMode(string portName, SmlComServiceClient proxy, Guid clientGuid, bool operationMode)
 {
     Console.WriteLine("Setting operation mode to: " + operationMode);
     proxy.WriteIsOperationModeEdl40(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName), operationMode);
     var booleanResult = proxy.ReadIsOperationModeEdl40(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName));
     Console.WriteLine("Operation mode read: " + Stringify(booleanResult));
     Console.WriteLine();
 }