-
Notifications
You must be signed in to change notification settings - Fork 26
/
StatInfo.cs
38 lines (32 loc) · 1.11 KB
/
StatInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace l99.driver.fanuc
{
public partial class Platform
{
public async Task<dynamic> StatInfoAsync()
{
return await Task.FromResult(StatInfo());
}
public dynamic StatInfo()
{
Focas.ODBST statinfo = new Focas.ODBST();
NativeDispatchReturn ndr = nativeDispatch(() =>
{
return (Focas.focas_ret) Focas.cnc_statinfo(_handle, statinfo);
});
var nr = new
{
method = "cnc_statinfo",
invocationMs = ndr.ElapsedMilliseconds,
doc = "https://www.inventcom.net/fanuc-focas-library/misc/cnc_statinfo",
success = ndr.RC == Focas.EW_OK,
rc = ndr.RC,
request = new {cnc_statinfo = new { }},
response = new {cnc_statinfo = new {statinfo}}
};
_logger.Trace($"[{_machine.Id}] Platform invocation result:\n{JObject.FromObject(nr).ToString()}");
return nr;
}
}
}