Example #1
0
 /// <summary>
 /// Creates a new NGRIDController object.
 /// </summary>
 /// <param name="name">Name of the controller</param>
 public NGRIDController(string name)
     : base(name, CommunicationLayer.CreateApplicationId())
 {
     _settings = NGRIDSettings.Instance;
     //_designSettings = NGRIDDesignSettings.Instance;
     MessageReceived += NGRIDController_MessageReceived;
 }
Example #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="name">Name of the remote application</param>
 protected MDSPersistentRemoteApplicationBase(string name) :
     base(name, CommunicationLayer.CreateApplicationId())
 {
     _waitingMessages               = new LinkedList <WaitingMessage>();
     _biggestWaitingMessageId       = 0;
     _biggestWaitingMessageIdInList = 0;
 }
Example #3
0
 /// <summary>
 /// Creates a new MDSController object.
 /// </summary>
 /// <param name="name">Name of the controller</param>
 public MDSController(string name)
     : base(name, CommunicationLayer.CreateApplicationId())
 {
     _settings        = MDSSettings.Instance;
     _designSettings  = MDSDesignSettings.Instance;
     MessageReceived += MDSController_MessageReceived;
 }
Example #4
0
 public void Flush()
 {
     for (int i = 0; i < 10; i++)
     {
         SendAction(Actions.ClearBuffer);
     }
     CommunicationLayer.Transmit();
 }
Example #5
0
 public void Draw()
 {
     SendAction(Actions.Render);
     Console.WriteLine($"{1000 / Math.Max(lastDraw.ElapsedMilliseconds, 1)} FPS");
     CommunicationLayer.Transmit();
     lastDraw.Restart();
     //Thread.Sleep(3);
 }
Example #6
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="communicationLayer">Reference to the Communication Layer</param>
 /// <param name="storageManager">Reference to the Storage Manager</param>
 /// <param name="routingTable">Reference to the routing table</param>
 /// <param name="serverGraph">Reference to server graph</param>
 /// <param name="clientApplicationList">Reference to application list</param>
 /// <param name="ngridManager">Reference to NGRID Manager object</param>
 public OrganizationLayer(CommunicationLayer communicationLayer, IStorageManager storageManager, RoutingTable routingTable, NGRIDServerGraph serverGraph, NGRIDClientApplicationList clientApplicationList, NGRIDController ngridManager)
 {
     _settings              = NGRIDSettings.Instance;
     _communicationLayer    = communicationLayer;
     _storageManager        = storageManager;
     _routingTable          = routingTable;
     _serverGraph           = serverGraph;
     _clientApplicationList = clientApplicationList;
     _ngridManager          = ngridManager;
     _waitingMessages       = new SortedList <string, WaitingMessage>();
     PrepareCommunicationLayer();
 }
 public ApplicationService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/apps";
 }
 public DynabicMarketingPlansService(CommunicationLayer service)
 {
     _service = service;
     // TODO: this REST service is not implemented yet.
     _gatewayURL = service.Environment.GatewayURL + "";
 }
Example #9
0
 public SiteService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/sites";
 }
Example #10
0
 public void PrintIncoming()
 {
     CommunicationLayer.PrintIncoming();
 }
 public CompanyInfoService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/companyinfo";
 }
Example #12
0
        private void SetPixel(byte position, byte r, byte g, byte b)
        {
            byte[] buffer = { position, r, g, b };

            CommunicationLayer.Queue(buffer);
        }
Example #13
0
 private void SendAction(Actions action)
 {
     CommunicationLayer.Queue((byte)action);
 }
Example #14
0
 public void Dispose()
 {
     CommunicationLayer?.Dispose();
 }
Example #15
0
 protected internal ProductsService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/products";
 }
Example #16
0
 public UserService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/users";
 }
 protected internal TransactionService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/transactions";
 }
Example #18
0
 protected internal CustomerService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/customers";
 }
 protected internal SubscriptionService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/subscriptions";
 }
Example #20
0
 public SettingService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/settings";
 }
Example #21
0
 public EventService(CommunicationLayer service)
 {
     _service = service;
     _gatewayURL = service.Environment.GatewayURL + "/events";
 }