/* Send a single value to the buffer. */ void sendDatum(DeviceDatum aValue) { if (aValue.requiresFlush()) { sendBuffer(); } aValue.append(ref mBuffer); if (aValue.requiresFlush()) { sendBuffer(); } }
/* 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); } }
/* Send a single value to the buffer. */ void sendDatum(DeviceDatum aValue) { if (aValue.requiresFlush()) sendBuffer(); aValue.append(ref mBuffer); if (aValue.requiresFlush()) sendBuffer(); }