Exemplo n.º 1
0
 /* Send a single value to the buffer. */
 void sendDatum(DeviceDatum aValue)
 {
     if (aValue.requiresFlush())
     {
         sendBuffer();
     }
     aValue.append(ref mBuffer);
     if (aValue.requiresFlush())
     {
         sendBuffer();
     }
 }
Exemplo n.º 2
0
        /* Send the initial values to a client */
        public void sendInitialData(Client aClient)
        {
            string buffer = String.Empty;

            gatherDeviceData();

            for (int i = 0; i < mDeviceData.Count; i++)
            {
                DeviceDatum value = mDeviceData[i];
                if (value.hasInitialValue())
                {
                    value.append(ref buffer);
                }
            }
            if (mBuffer.Count() > 0)
            {
                buffer = Utils.GetNowDateTime() + " " + mBuffer + "\n";
                Logger.LogMessage(buffer, 3);
                mServer.sendToClient(aClient, buffer);
            }
        }
Exemplo n.º 3
0
 /* Send a single value to the buffer. */
 void sendDatum(DeviceDatum aValue)
 {
     if (aValue.requiresFlush())
         sendBuffer();
     aValue.append(ref mBuffer);
     if (aValue.requiresFlush())
         sendBuffer();
 }