Sub WebSocket_NewMessage (FunctionName As String, Params() As String)
Select FunctionName
Case FUNCTION_EMPL_INFO
If ScreenType = SCREEN_TYPE_READ Then
UpdateName(Params(1))
' NLCD.PutString(1,31,Params(1),NLCD.Font8x16,False,False)
' NLCD.InvertArea(0,30,NLCD.LCDWIDTH,18) 'highlight name
If Params(0) = "E00" Then
UpdateSavedIcon(True)
BeepConfirm
Else
UpdateSavedIcon(False)
BeepError
End If
NLCD.Update
End If
Case FUNCTION_SYNC_DATE_TIME ' sync server date time
'(21,22,7,25,11,59,00,1) 'century,yr,mon,day,hr,min,sec,day of week, 7 = sunday
DT(0) = 21
DT(1) = Params(0)
DT(2) = Params(1)
DT(3) = Params(2)
DT(4) = Params(3)
DT(5) = Params(4)
DT(6) = Params(5)
DT(7) = Params(6)
RTC.SetClock(DT,0,0)
Case FUNCTION_SET_DEVICE_CONFIG 'this part is not working, array length error
Log(Params.Length) 'returns 9, should be 13
Log(Params(0))
Log(Params(1))
Log(Params(2))
Log(Params(3))
Log(Params(4))
Log(Params(5))
Log(Params(6))
Log(Params(7))
Log(Params(8))
Log(Params(9))
Log(Params(10))
Log(Params(11))
Log(Params(12))