1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- using System.Collections.Generic;
- using InABox.IPC;
- namespace PRSServer
- {
-
- public enum PortState
- {
- Unavailable,
- Available,
- Secure,
- }
-
- public enum PortType
- {
- None,
- Database,
- Session,
- Web,
- GPS,
- Sigfox,
- Certificate
- }
-
- public class PortStatus
- {
- public int Port { get; set; }
- public PortType Type { get; set; }
- public PortState State { get; set; }
- public PortStatus(int port, PortType type, PortState state)
- {
- Port = port;
- Type = type;
- State = state;
- }
- public PortStatus()
- {
- Port = 0;
- Type = PortType.None;
- State = PortState.Unavailable;
- }
- }
-
- //public class PortStatus[] : List<PortStatus> { }
-
- public class PortStatusCommand : IRPCCommand<PortStatusParameters,PortStatus[]> { }
-
- public class PortStatusParameters { }
-
- public class PortStatusHandler : RPCCommandHandler<IEngine,PortStatusParameters,PortStatus[]>
- {
- public override PortStatus[]? Execute(PortStatusParameters? parameters) => Sender.PortStatusList();
- public PortStatusHandler(IEngine sender) : base(sender)
- {
- }
- }
-
- }
|