@signageos/front-applet 7.2.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (420) hide show
  1. package/dist/bundle.js +8 -4
  2. package/dist/bundle.js.map +1 -1
  3. package/docs/fpath/index.md +316 -0
  4. package/docs/index.md +18 -85
  5. package/docs/sos/browser.md +210 -0
  6. package/docs/sos/command.md +68 -0
  7. package/docs/sos/debug.md +25 -0
  8. package/docs/sos/deviceInfo.md +49 -0
  9. package/docs/sos/display.md +21 -0
  10. package/docs/sos/fileSystem.md +594 -0
  11. package/docs/sos/hardware/barcodeScanner.md +40 -0
  12. package/docs/sos/hardware/index.md +64 -0
  13. package/docs/sos/hardware/led.md +14 -0
  14. package/docs/sos/index.md +82 -0
  15. package/docs/sos/input.md +73 -0
  16. package/docs/sos/monitors.md +21 -0
  17. package/docs/sos/native/index.md +5 -0
  18. package/docs/sos/native/mdc.md +240 -0
  19. package/docs/sos/offline/cache.md +183 -0
  20. package/docs/sos/offline/index.md +188 -0
  21. package/docs/sos/osd.md +13 -0
  22. package/docs/sos/proofOfPlay.md +37 -0
  23. package/docs/sos/stream.md +960 -0
  24. package/docs/sos/sync.md +298 -0
  25. package/docs/sos/video.md +285 -0
  26. package/docs/sos_management/app.md +102 -0
  27. package/docs/sos_management/audio.md +29 -0
  28. package/docs/sos_management/debug.md +33 -0
  29. package/docs/sos_management/firmware.md +86 -0
  30. package/docs/sos_management/index.md +212 -0
  31. package/docs/sos_management/network.md +197 -0
  32. package/docs/sos_management/os.md +54 -0
  33. package/docs/sos_management/package.md +33 -0
  34. package/docs/sos_management/power.md +136 -0
  35. package/docs/sos_management/proxy.md +41 -0
  36. package/docs/sos_management/remoteControl.md +72 -0
  37. package/docs/sos_management/screen.md +198 -0
  38. package/docs/sos_management/security.md +47 -0
  39. package/docs/sos_management/time.md +101 -0
  40. package/docs/sos_management/wifi.md +366 -0
  41. package/es6/FrontApplet/Browser/Browser.d.ts +61 -8
  42. package/es6/FrontApplet/Browser/Browser.js +91 -39
  43. package/es6/FrontApplet/Browser/Browser.js.map +1 -1
  44. package/es6/FrontApplet/Browser/events.js +2 -2
  45. package/es6/FrontApplet/Browser/events.js.map +1 -1
  46. package/es6/FrontApplet/Command/Command.d.ts +37 -3
  47. package/es6/FrontApplet/Command/Command.js +49 -20
  48. package/es6/FrontApplet/Command/Command.js.map +1 -1
  49. package/es6/FrontApplet/Command/ICommandEvent.d.ts +6 -2
  50. package/es6/FrontApplet/Connect/Connect.d.ts +3 -0
  51. package/es6/FrontApplet/Connect/Connect.js +55 -7
  52. package/es6/FrontApplet/Connect/Connect.js.map +1 -1
  53. package/es6/FrontApplet/Connect/IConnectMessage.d.ts +1 -1
  54. package/es6/FrontApplet/Debug/Debug.d.ts +15 -1
  55. package/es6/FrontApplet/Debug/Debug.js +27 -17
  56. package/es6/FrontApplet/Debug/Debug.js.map +1 -1
  57. package/es6/FrontApplet/Debug/debugDecorator.d.ts +3 -3
  58. package/es6/FrontApplet/Debug/debugDecorator.js +13 -7
  59. package/es6/FrontApplet/Debug/debugDecorator.js.map +1 -1
  60. package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +23 -0
  61. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +36 -27
  62. package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
  63. package/es6/FrontApplet/Dimensions/coordinationsHelper.js +1 -2
  64. package/es6/FrontApplet/Dimensions/coordinationsHelper.js.map +1 -1
  65. package/es6/FrontApplet/Display/Display.d.ts +25 -3
  66. package/es6/FrontApplet/Display/Display.js +35 -19
  67. package/es6/FrontApplet/Display/Display.js.map +1 -1
  68. package/es6/FrontApplet/Display/IDisplay.d.ts +3 -1
  69. package/es6/FrontApplet/Error/AppletCommandError.js +12 -3
  70. package/es6/FrontApplet/Error/AppletCommandError.js.map +1 -1
  71. package/es6/FrontApplet/Error/AppletError.js +10 -2
  72. package/es6/FrontApplet/Error/AppletError.js.map +1 -1
  73. package/es6/FrontApplet/Error/AppletHardwareError.js +12 -3
  74. package/es6/FrontApplet/Error/AppletHardwareError.js.map +1 -1
  75. package/es6/FrontApplet/Error/AppletOfflineCacheError.js +10 -2
  76. package/es6/FrontApplet/Error/AppletOfflineCacheError.js.map +1 -1
  77. package/es6/FrontApplet/Error/AppletResourcesError.js +12 -3
  78. package/es6/FrontApplet/Error/AppletResourcesError.js.map +1 -1
  79. package/es6/FrontApplet/Error/AppletSecurityError.js +12 -3
  80. package/es6/FrontApplet/Error/AppletSecurityError.js.map +1 -1
  81. package/es6/FrontApplet/Error/AppletStreamError.js +10 -2
  82. package/es6/FrontApplet/Error/AppletStreamError.js.map +1 -1
  83. package/es6/FrontApplet/Error/AppletVideoError.js +12 -3
  84. package/es6/FrontApplet/Error/AppletVideoError.js.map +1 -1
  85. package/es6/FrontApplet/Error/ErrorCodesMessages.js +4 -1
  86. package/es6/FrontApplet/Error/ErrorCodesMessages.js.map +1 -1
  87. package/es6/FrontApplet/Error/ErrorSuggestions.js +1 -0
  88. package/es6/FrontApplet/Error/ErrorSuggestions.js.map +1 -1
  89. package/es6/FrontApplet/Error/FileNotFoundError.js +10 -2
  90. package/es6/FrontApplet/Error/FileNotFoundError.js.map +1 -1
  91. package/es6/FrontApplet/Error/SosError.js +4 -0
  92. package/es6/FrontApplet/Error/SosError.js.map +1 -1
  93. package/es6/FrontApplet/Error/errorHelper.js +5 -6
  94. package/es6/FrontApplet/Error/errorHelper.js.map +1 -1
  95. package/es6/FrontApplet/Exchange/Exchange.js +7 -14
  96. package/es6/FrontApplet/Exchange/Exchange.js.map +1 -1
  97. package/es6/FrontApplet/FileSystem/FileSystem.d.ts +156 -1
  98. package/es6/FrontApplet/FileSystem/FileSystem.js +316 -193
  99. package/es6/FrontApplet/FileSystem/FileSystem.js.map +1 -1
  100. package/es6/FrontApplet/FileSystem/HashAlgorithm.d.ts +2 -0
  101. package/es6/FrontApplet/{Stream/streamListeners.js → FileSystem/HashAlgorithm.js} +1 -1
  102. package/es6/FrontApplet/FileSystem/HashAlgorithm.js.map +1 -0
  103. package/es6/FrontApplet/Font/fontFaceGenerator.js.map +1 -1
  104. package/es6/FrontApplet/FrontApplet.d.ts +55 -4
  105. package/es6/FrontApplet/FrontApplet.js +124 -47
  106. package/es6/FrontApplet/FrontApplet.js.map +1 -1
  107. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.d.ts +2 -0
  108. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js +35 -54
  109. package/es6/FrontApplet/Hardware/BarcodeScanner/BarcodeScanner.js.map +1 -1
  110. package/es6/FrontApplet/Hardware/Hardware.d.ts +16 -2
  111. package/es6/FrontApplet/Hardware/Hardware.js +31 -19
  112. package/es6/FrontApplet/Hardware/Hardware.js.map +1 -1
  113. package/es6/FrontApplet/Hardware/IHardware.d.ts +2 -2
  114. package/es6/FrontApplet/Hardware/ISerialPort.d.ts +16 -0
  115. package/es6/FrontApplet/Hardware/ISerialPortOptions.js +1 -1
  116. package/es6/FrontApplet/Hardware/ISerialPortOptions.js.map +1 -1
  117. package/es6/FrontApplet/Hardware/Led/Led.d.ts +8 -0
  118. package/es6/FrontApplet/Hardware/Led/Led.js +20 -18
  119. package/es6/FrontApplet/Hardware/Led/Led.js.map +1 -1
  120. package/es6/FrontApplet/Hardware/SerialPort.d.ts +1 -1
  121. package/es6/FrontApplet/Hardware/SerialPort.js +15 -23
  122. package/es6/FrontApplet/Hardware/SerialPort.js.map +1 -1
  123. package/es6/FrontApplet/Hash/generator.js +1 -2
  124. package/es6/FrontApplet/Hash/generator.js.map +1 -1
  125. package/es6/FrontApplet/Iframe/Iframe.d.ts +9 -8
  126. package/es6/FrontApplet/Iframe/Iframe.js +10 -0
  127. package/es6/FrontApplet/Iframe/Iframe.js.map +1 -1
  128. package/es6/FrontApplet/Input/IInput.d.ts +1 -2
  129. package/es6/FrontApplet/Input/IKeyUpEvent.d.ts +32 -2
  130. package/es6/FrontApplet/Input/IKeyUpEvent.js +32 -0
  131. package/es6/FrontApplet/Input/IKeyUpEvent.js.map +1 -1
  132. package/es6/FrontApplet/Input/Input.d.ts +19 -3
  133. package/es6/FrontApplet/Input/Input.js +43 -22
  134. package/es6/FrontApplet/Input/Input.js.map +1 -1
  135. package/es6/FrontApplet/Management/App/App.d.ts +48 -10
  136. package/es6/FrontApplet/Management/App/App.js +45 -30
  137. package/es6/FrontApplet/Management/App/App.js.map +1 -1
  138. package/es6/FrontApplet/Management/App/IApp.d.ts +3 -1
  139. package/es6/FrontApplet/Management/Audio/Audio.d.ts +16 -0
  140. package/es6/FrontApplet/Management/Audio/Audio.js +30 -22
  141. package/es6/FrontApplet/Management/Audio/Audio.js.map +1 -1
  142. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.d.ts +4 -0
  143. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js +15 -22
  144. package/es6/FrontApplet/Management/AutoRecovery/AutoRecovery.js.map +1 -1
  145. package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js +4 -1
  146. package/es6/FrontApplet/Management/AutoRecovery/IAutoRecovery.js.map +1 -1
  147. package/es6/FrontApplet/Management/Debug/Debug.d.ts +19 -0
  148. package/es6/FrontApplet/Management/Debug/Debug.js +37 -30
  149. package/es6/FrontApplet/Management/Debug/Debug.js.map +1 -1
  150. package/es6/FrontApplet/Management/Firmware/Firmware.d.ts +37 -10
  151. package/es6/FrontApplet/Management/Firmware/Firmware.js +34 -30
  152. package/es6/FrontApplet/Management/Firmware/Firmware.js.map +1 -1
  153. package/es6/FrontApplet/Management/Firmware/IFirmware.d.ts +1 -2
  154. package/es6/FrontApplet/Management/IManagement.d.ts +3 -1
  155. package/es6/FrontApplet/Management/Management.d.ts +106 -15
  156. package/es6/FrontApplet/Management/Management.js +191 -113
  157. package/es6/FrontApplet/Management/Management.js.map +1 -1
  158. package/es6/FrontApplet/Management/Network/INetworkInfo.d.ts +1 -1
  159. package/es6/FrontApplet/Management/Network/Network.d.ts +56 -8
  160. package/es6/FrontApplet/Management/Network/Network.js +85 -67
  161. package/es6/FrontApplet/Management/Network/Network.js.map +1 -1
  162. package/es6/FrontApplet/Management/OS/OS.d.ts +20 -0
  163. package/es6/FrontApplet/Management/OS/OS.js +34 -27
  164. package/es6/FrontApplet/Management/OS/OS.js.map +1 -1
  165. package/es6/FrontApplet/Management/Package/Package.d.ts +20 -0
  166. package/es6/FrontApplet/Management/Package/Package.js +37 -22
  167. package/es6/FrontApplet/Management/Package/Package.js.map +1 -1
  168. package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js +4 -1
  169. package/es6/FrontApplet/Management/PeerRecovery/IPeerRecovery.js.map +1 -1
  170. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.d.ts +4 -0
  171. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js +15 -22
  172. package/es6/FrontApplet/Management/PeerRecovery/PeerRecovery.js.map +1 -1
  173. package/es6/FrontApplet/Management/Power/Power.d.ts +64 -0
  174. package/es6/FrontApplet/Management/Power/Power.js +160 -115
  175. package/es6/FrontApplet/Management/Power/Power.js.map +1 -1
  176. package/es6/FrontApplet/Management/Proxy/Proxy.d.ts +21 -0
  177. package/es6/FrontApplet/Management/Proxy/Proxy.js +41 -35
  178. package/es6/FrontApplet/Management/Proxy/Proxy.js.map +1 -1
  179. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.d.ts +43 -0
  180. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js +63 -39
  181. package/es6/FrontApplet/Management/RemoteControl/RemoteControl.js.map +1 -1
  182. package/es6/FrontApplet/Management/Screen/Screen.d.ts +127 -0
  183. package/es6/FrontApplet/Management/Screen/Screen.js +197 -89
  184. package/es6/FrontApplet/Management/Screen/Screen.js.map +1 -1
  185. package/es6/FrontApplet/Management/Security/Security.d.ts +20 -5
  186. package/es6/FrontApplet/Management/Security/Security.js +33 -31
  187. package/es6/FrontApplet/Management/Security/Security.js.map +1 -1
  188. package/es6/FrontApplet/Management/Time/Time.d.ts +31 -5
  189. package/es6/FrontApplet/Management/Time/Time.js +49 -40
  190. package/es6/FrontApplet/Management/Time/Time.js.map +1 -1
  191. package/es6/FrontApplet/Management/Wifi/IWifiEvent.d.ts +18 -0
  192. package/es6/FrontApplet/Management/Wifi/IWifiEvent.js +19 -1
  193. package/es6/FrontApplet/Management/Wifi/IWifiEvent.js.map +1 -1
  194. package/es6/FrontApplet/Management/Wifi/Wifi.d.ts +108 -7
  195. package/es6/FrontApplet/Management/Wifi/Wifi.js +162 -86
  196. package/es6/FrontApplet/Management/Wifi/Wifi.js.map +1 -1
  197. package/es6/FrontApplet/Management/helpers/DeviceHelper.js +2 -2
  198. package/es6/FrontApplet/Management/helpers/DeviceHelper.js.map +1 -1
  199. package/es6/FrontApplet/Management/helpers/SecurityHelper.js +8 -6
  200. package/es6/FrontApplet/Management/helpers/SecurityHelper.js.map +1 -1
  201. package/es6/FrontApplet/Management/helpers/TimerHelper.js +2 -2
  202. package/es6/FrontApplet/Management/helpers/TimerHelper.js.map +1 -1
  203. package/es6/FrontApplet/Management/helpers/UpgradeHelper.js +35 -3
  204. package/es6/FrontApplet/Management/helpers/UpgradeHelper.js.map +1 -1
  205. package/es6/FrontApplet/Management/helpers/VideoHelper.js +1 -1
  206. package/es6/FrontApplet/Management/helpers/VideoHelper.js.map +1 -1
  207. package/es6/FrontApplet/Monitors/Monitors.d.ts +9 -0
  208. package/es6/FrontApplet/Monitors/Monitors.js +16 -16
  209. package/es6/FrontApplet/Monitors/Monitors.js.map +1 -1
  210. package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js +1 -1
  211. package/es6/FrontApplet/NativeCommands/MDC/CodesMDC.js.map +1 -1
  212. package/es6/FrontApplet/NativeCommands/MDC/Mdc.d.ts +51 -2
  213. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js +79 -38
  214. package/es6/FrontApplet/NativeCommands/MDC/Mdc.js.map +1 -1
  215. package/es6/FrontApplet/NativeCommands/NativeCommands.d.ts +4 -0
  216. package/es6/FrontApplet/NativeCommands/NativeCommands.js +12 -2
  217. package/es6/FrontApplet/NativeCommands/NativeCommands.js.map +1 -1
  218. package/es6/FrontApplet/OSD/OSD.d.ts +9 -0
  219. package/es6/FrontApplet/OSD/OSD.js +15 -15
  220. package/es6/FrontApplet/OSD/OSD.js.map +1 -1
  221. package/es6/FrontApplet/Offline/Cache/Cache.d.ts +91 -2
  222. package/es6/FrontApplet/Offline/Cache/Cache.js +192 -130
  223. package/es6/FrontApplet/Offline/Cache/Cache.js.map +1 -1
  224. package/es6/FrontApplet/Offline/Flags/AppendFlagController.d.ts +1 -1
  225. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js +17 -25
  226. package/es6/FrontApplet/Offline/Flags/AppendFlagController.js.map +1 -1
  227. package/es6/FrontApplet/Offline/Flags/IFlags.d.ts +4 -4
  228. package/es6/FrontApplet/Offline/IAddFont.d.ts +3 -1
  229. package/es6/FrontApplet/Offline/IAddFont.js.map +1 -1
  230. package/es6/FrontApplet/Offline/ISaveFile.js +5 -2
  231. package/es6/FrontApplet/Offline/ISaveFile.js.map +1 -1
  232. package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js +2 -1
  233. package/es6/FrontApplet/Offline/LoadFile/CssLoadFileController.js.map +1 -1
  234. package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js +2 -1
  235. package/es6/FrontApplet/Offline/LoadFile/JavascriptLoadFileController.js.map +1 -1
  236. package/es6/FrontApplet/Offline/Offline.d.ts +75 -4
  237. package/es6/FrontApplet/Offline/Offline.js +116 -56
  238. package/es6/FrontApplet/Offline/Offline.js.map +1 -1
  239. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.d.ts +19 -1
  240. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js +41 -29
  241. package/es6/FrontApplet/ProofOfPlay/ProofOfPlay.js.map +1 -1
  242. package/es6/FrontApplet/Sensors/Proximity.d.ts +4 -3
  243. package/es6/FrontApplet/Sensors/Proximity.js +12 -4
  244. package/es6/FrontApplet/Sensors/Proximity.js.map +1 -1
  245. package/es6/FrontApplet/Sensors/Sensors.d.ts +2 -0
  246. package/es6/FrontApplet/Sensors/Sensors.js +9 -2
  247. package/es6/FrontApplet/Sensors/Sensors.js.map +1 -1
  248. package/es6/FrontApplet/Stream/IStream.d.ts +10 -10
  249. package/es6/FrontApplet/Stream/Stream.d.ts +130 -15
  250. package/es6/FrontApplet/Stream/Stream.js +229 -130
  251. package/es6/FrontApplet/Stream/Stream.js.map +1 -1
  252. package/es6/FrontApplet/Stream/StreamProtocol.js.map +1 -1
  253. package/es6/FrontApplet/Sync/Sync.d.ts +152 -6
  254. package/es6/FrontApplet/Sync/Sync.js +196 -112
  255. package/es6/FrontApplet/Sync/Sync.js.map +1 -1
  256. package/es6/FrontApplet/Sync/syncEvents.d.ts +3 -1
  257. package/es6/FrontApplet/Sync/syncMessages.js +1 -1
  258. package/es6/FrontApplet/Sync/syncMessages.js.map +1 -1
  259. package/es6/FrontApplet/Timing/Timing.d.ts +1 -0
  260. package/es6/FrontApplet/Timing/Timing.js +9 -2
  261. package/es6/FrontApplet/Timing/Timing.js.map +1 -1
  262. package/es6/FrontApplet/Timing/Triggers/ITimingTriggersMessage.d.ts +1 -1
  263. package/es6/FrontApplet/Timing/Triggers/Triggers.d.ts +9 -0
  264. package/es6/FrontApplet/Timing/Triggers/Triggers.js +16 -18
  265. package/es6/FrontApplet/Timing/Triggers/Triggers.js.map +1 -1
  266. package/es6/FrontApplet/Touch/Touch.d.ts +3 -0
  267. package/es6/FrontApplet/Touch/Touch.js +13 -3
  268. package/es6/FrontApplet/Touch/Touch.js.map +1 -1
  269. package/es6/FrontApplet/Validate/Validate.js +14 -11
  270. package/es6/FrontApplet/Validate/Validate.js.map +1 -1
  271. package/es6/FrontApplet/Validate/ValidateObjectInterface.js +7 -2
  272. package/es6/FrontApplet/Validate/ValidateObjectInterface.js.map +1 -1
  273. package/es6/FrontApplet/Video/IOptions.d.ts +8 -1
  274. package/es6/FrontApplet/Video/IVideo.d.ts +8 -8
  275. package/es6/FrontApplet/Video/IVideoEvent.js +3 -3
  276. package/es6/FrontApplet/Video/IVideoEvent.js.map +1 -1
  277. package/es6/FrontApplet/Video/Video.d.ts +84 -12
  278. package/es6/FrontApplet/Video/Video.js +161 -102
  279. package/es6/FrontApplet/Video/Video.js.map +1 -1
  280. package/es6/FrontApplet/createFrontApplet.js +5 -2
  281. package/es6/FrontApplet/createFrontApplet.js.map +1 -1
  282. package/es6/Monitoring/Display/handleDisplayRequests.d.ts +2 -2
  283. package/es6/Monitoring/Display/handleDisplayRequests.js +5 -15
  284. package/es6/Monitoring/Display/handleDisplayRequests.js.map +1 -1
  285. package/es6/Monitoring/FileSystem/fileSystemCommands.d.ts +10 -1
  286. package/es6/Monitoring/FileSystem/fileSystemCommands.js +3 -1
  287. package/es6/Monitoring/FileSystem/fileSystemCommands.js.map +1 -1
  288. package/es6/Monitoring/FileSystem/handleFileSystemRequests.d.ts +2 -2
  289. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js +41 -45
  290. package/es6/Monitoring/FileSystem/handleFileSystemRequests.js.map +1 -1
  291. package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.d.ts +2 -2
  292. package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js +4 -14
  293. package/es6/Monitoring/Html/handleHtmlSnapshotTakingRequests.js.map +1 -1
  294. package/es6/Monitoring/Management/App/handleApplicationRequests.d.ts +2 -2
  295. package/es6/Monitoring/Management/App/handleApplicationRequests.js +9 -19
  296. package/es6/Monitoring/Management/App/handleApplicationRequests.js.map +1 -1
  297. package/es6/Monitoring/Management/Audio/handleAudioRequests.d.ts +2 -2
  298. package/es6/Monitoring/Management/Audio/handleAudioRequests.js +7 -17
  299. package/es6/Monitoring/Management/Audio/handleAudioRequests.js.map +1 -1
  300. package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.d.ts +2 -2
  301. package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js +7 -17
  302. package/es6/Monitoring/Management/AutoRecovery/handleAutoRecoveryRequests.js.map +1 -1
  303. package/es6/Monitoring/Management/Debug/handleDebugRequests.d.ts +2 -2
  304. package/es6/Monitoring/Management/Debug/handleDebugRequests.js +9 -19
  305. package/es6/Monitoring/Management/Debug/handleDebugRequests.js.map +1 -1
  306. package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.d.ts +2 -2
  307. package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js +11 -21
  308. package/es6/Monitoring/Management/Network/handleManagementNetworkRequests.js.map +1 -1
  309. package/es6/Monitoring/Management/Os/managementOsRequests.d.ts +2 -2
  310. package/es6/Monitoring/Management/Os/managementOsRequests.js +9 -19
  311. package/es6/Monitoring/Management/Os/managementOsRequests.js.map +1 -1
  312. package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.d.ts +2 -2
  313. package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js +7 -17
  314. package/es6/Monitoring/Management/PeerRecovery/handlePeerRecoveryRequests.js.map +1 -1
  315. package/es6/Monitoring/Management/Power/handlePowerRequests.d.ts +2 -2
  316. package/es6/Monitoring/Management/Power/handlePowerRequests.js +19 -29
  317. package/es6/Monitoring/Management/Power/handlePowerRequests.js.map +1 -1
  318. package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.d.ts +2 -2
  319. package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js +15 -25
  320. package/es6/Monitoring/Management/RemoteControl/handleRemoteControlRequests.js.map +1 -1
  321. package/es6/Monitoring/Management/Screen/handleScreenRequests.d.ts +2 -2
  322. package/es6/Monitoring/Management/Screen/handleScreenRequests.js +19 -29
  323. package/es6/Monitoring/Management/Screen/handleScreenRequests.js.map +1 -1
  324. package/es6/Monitoring/Management/Security/handleSecurityCommands.d.ts +2 -2
  325. package/es6/Monitoring/Management/Security/handleSecurityCommands.js +9 -19
  326. package/es6/Monitoring/Management/Security/handleSecurityCommands.js.map +1 -1
  327. package/es6/Monitoring/Management/Time/handleTimeCommands.d.ts +2 -2
  328. package/es6/Monitoring/Management/Time/handleTimeCommands.js +9 -19
  329. package/es6/Monitoring/Management/Time/handleTimeCommands.js.map +1 -1
  330. package/es6/Monitoring/Management/handleManagementRequests.d.ts +2 -2
  331. package/es6/Monitoring/Management/handleManagementRequests.js +23 -33
  332. package/es6/Monitoring/Management/handleManagementRequests.js.map +1 -1
  333. package/es6/Monitoring/{Montoring.d.ts → Monitoring.d.ts} +1 -0
  334. package/es6/Monitoring/{Montoring.js → Monitoring.js} +12 -23
  335. package/es6/Monitoring/Monitoring.js.map +1 -0
  336. package/es6/Monitoring/NativeCommands/handleNativeCommands.d.ts +2 -2
  337. package/es6/Monitoring/NativeCommands/handleNativeCommands.js +5 -15
  338. package/es6/Monitoring/NativeCommands/handleNativeCommands.js.map +1 -1
  339. package/es6/Monitoring/OSD/handleOsdRequests.d.ts +2 -2
  340. package/es6/Monitoring/OSD/handleOsdRequests.js +5 -15
  341. package/es6/Monitoring/OSD/handleOsdRequests.js.map +1 -1
  342. package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.d.ts +2 -2
  343. package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js +23 -33
  344. package/es6/Monitoring/Offline/Cache/handleOfflineCacheRequests.js.map +1 -1
  345. package/es6/Monitoring/Video/handleVideoRequests.d.ts +2 -2
  346. package/es6/Monitoring/Video/handleVideoRequests.js +36 -9
  347. package/es6/Monitoring/Video/handleVideoRequests.js.map +1 -1
  348. package/es6/Monitoring/handleMonitoringRequests.d.ts +2 -2
  349. package/es6/Monitoring/handleMonitoringRequests.js +6 -16
  350. package/es6/Monitoring/handleMonitoringRequests.js.map +1 -1
  351. package/es6/Sensors/IButton.js +1 -1
  352. package/es6/Sensors/IButton.js.map +1 -1
  353. package/es6/Sensors/IRfidAntenna.js +1 -1
  354. package/es6/Sensors/IRfidAntenna.js.map +1 -1
  355. package/es6/Util/Console/enhancer.js +1 -2
  356. package/es6/Util/Console/enhancer.js.map +1 -1
  357. package/es6/bundle.d.ts +1 -1
  358. package/es6/bundle.js +6 -3
  359. package/es6/bundle.js.map +1 -1
  360. package/es6/fpath.js +34 -1
  361. package/es6/fpath.js.map +1 -1
  362. package/es6/utils/types.d.ts +1 -0
  363. package/es6/{FrontApplet/Input/IKeyUpEventListener.js → utils/types.js} +1 -1
  364. package/es6/utils/types.js.map +1 -0
  365. package/package.json +27 -25
  366. package/CHANGELOG.md +0 -484
  367. package/docs/applet-basics.md +0 -272
  368. package/docs/content/js-applet-resources.md +0 -154
  369. package/docs/content/js-browser.md +0 -163
  370. package/docs/content/js-command.md +0 -154
  371. package/docs/content/js-debug.md +0 -36
  372. package/docs/content/js-device-info.md +0 -56
  373. package/docs/content/js-display.md +0 -56
  374. package/docs/content/js-file-system.md +0 -670
  375. package/docs/content/js-fonts.md +0 -115
  376. package/docs/content/js-hardware.md +0 -55
  377. package/docs/content/js-iframes.md +0 -66
  378. package/docs/content/js-input.md +0 -71
  379. package/docs/content/js-offline-cache-media-files.md +0 -257
  380. package/docs/content/js-offline-cache-simple-data.md +0 -129
  381. package/docs/content/js-osd.md +0 -32
  382. package/docs/content/js-proof-of-play.md +0 -60
  383. package/docs/content/js-sensors.md +0 -70
  384. package/docs/content/js-serial.md +0 -165
  385. package/docs/content/js-sync-playback.md +0 -384
  386. package/docs/content/js-video-inputs-internal-ports.md +0 -131
  387. package/docs/content/js-video-stream.md +0 -618
  388. package/docs/content/js-video.md +0 -232
  389. package/docs/management/js-management-application.md +0 -107
  390. package/docs/management/js-management-audio.md +0 -44
  391. package/docs/management/js-management-debug.md +0 -40
  392. package/docs/management/js-management-firmware.md +0 -93
  393. package/docs/management/js-management-management.md +0 -178
  394. package/docs/management/js-management-monitoring-commands.md +0 -107
  395. package/docs/management/js-management-monitors.md +0 -55
  396. package/docs/management/js-management-native-commands-mdc.md +0 -90
  397. package/docs/management/js-management-network.md +0 -223
  398. package/docs/management/js-management-os.md +0 -62
  399. package/docs/management/js-management-package.md +0 -48
  400. package/docs/management/js-management-power.md +0 -175
  401. package/docs/management/js-management-proxy.md +0 -81
  402. package/docs/management/js-management-remote-control.md +0 -58
  403. package/docs/management/js-management-screen.md +0 -225
  404. package/docs/management/js-management-security.md +0 -71
  405. package/docs/management/js-management-time.md +0 -161
  406. package/docs/management/js-management-wifi.md +0 -341
  407. package/es6/FrontApplet/Command/ICommandEventListener.d.ts +0 -6
  408. package/es6/FrontApplet/Command/ICommandEventListener.js +0 -3
  409. package/es6/FrontApplet/Command/ICommandEventListener.js.map +0 -1
  410. package/es6/FrontApplet/Input/IKeyUpEventListener.d.ts +0 -5
  411. package/es6/FrontApplet/Input/IKeyUpEventListener.js.map +0 -1
  412. package/es6/FrontApplet/Management/Firmware/FirmwareType.d.ts +0 -4
  413. package/es6/FrontApplet/Management/Firmware/FirmwareType.js +0 -9
  414. package/es6/FrontApplet/Management/Firmware/FirmwareType.js.map +0 -1
  415. package/es6/FrontApplet/Stream/streamListeners.d.ts +0 -10
  416. package/es6/FrontApplet/Stream/streamListeners.js.map +0 -1
  417. package/es6/FrontApplet/Video/IVideoEventListener.d.ts +0 -5
  418. package/es6/FrontApplet/Video/IVideoEventListener.js +0 -3
  419. package/es6/FrontApplet/Video/IVideoEventListener.js.map +0 -1
  420. package/es6/Monitoring/Montoring.js.map +0 -1
@@ -1,129 +0,0 @@
1
- ---
2
- title: Offline Cache for storing data
3
- author: Miroslav Behina
4
- date: 22.11.2018
5
- type: js-api
6
- tags:
7
- - applet
8
- - applet_api
9
- - api
10
- - js_api
11
- description: "[Content JS API] This API provides you with approach similar to the HTML5's Local Storage, but implemented internally via native device API and completely device agnostic."
12
- ---
13
-
14
- # Offline Cache for storing simple data
15
-
16
- Use when you need to save some data into local memory.
17
- This API provides you with approach similar to the HTML5's Local Storage, but implemented internally via native device API and completely device agnostic.
18
- We do not recommend using a different storage type then Offline Cache or full featured [File System API](js-file-system) that will provide you with more low-level methods.
19
-
20
- ## All methods
21
-
22
- | Method | Description | Supported Since |
23
- | ------ | -------- | :--------: |
24
- | `loadContent()` | Loads content from internal storage | 1.0.3 |
25
- | `saveContent()` | Saves content to internal storage | 1.0.3 |
26
- | `listContents()` | List all content items saved previously to internal storage | 2.0.0 |
27
- | `deleteContent()` | Delete content item previously saved to internal storage | 2.0.0 |
28
-
29
- :::warning
30
- Emulator has certain limitations while handling offline files. [Read more here](https://docs.signageos.io/hc/en-us/articles/4405238997138)
31
- :::
32
-
33
- ## loadContent()
34
- Method `loadContent()` loads content from internal storage.
35
-
36
- ### Parameters
37
-
38
- | Param | Type | Required | Description |
39
- | -------------- | ------ | :-------: | ----------- |
40
- | `uid` | string | <div class="red">Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters |
41
-
42
- ### Javascript example
43
- ```javascript
44
- await sos.offline.cache.saveContent('ApplicationSecret', '123SuperSecretHash');
45
- ```
46
-
47
- ## saveContent()
48
- Method for saving content into internal storage.
49
-
50
- ### Parameters
51
-
52
- | Param | Type | Required | Description |
53
- | -------------- | ------ | :-------: | ----------- |
54
- | `uid` | string | <div class="red">Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters |
55
- | `content` | string | <div class="red">Yes</div> | Only string variables enabled. For JSON values use `JSON.Stringify()`
56
-
57
- ### Javascript Example
58
- ```javascript
59
- sos.offline.cache.saveContent('ApplicationSecret', '123SuperSecretHash')
60
- .then(() => {
61
- //Content was successfully saved, retrieve it.
62
- return sos.offline.cache.loadContent('ApplicationSecret');
63
- })
64
- .then((content) => {
65
- console.log('Loaded', content); // print 123SuperSecretHash
66
- })
67
- ```
68
-
69
- ## listContents()
70
- List all content items saved previously to internal storage
71
-
72
- ### Javascript example
73
- ```javascript
74
- await sos.offline.cache.listContents();
75
- ```
76
-
77
- ## deleteContent()
78
- Delete content item previously saved to internal storage.
79
-
80
- ### Parameters
81
-
82
- | Param | Type | Required | Description |
83
- | -------------- | ------ | :-------: | ----------- |
84
- | `uid` | string | <div class="red">Yes</div> | Unique file identifier is used for later file retrieval, must contain a-z,A-Z,0-9 and . characters |
85
-
86
- ### Javascript example
87
- ```javascript
88
- //Store
89
- sos.offline.cache.saveContent('ApplicationSecret', '123SuperSecretHash')
90
- .then(() => {
91
- //Content was successfully saved, retrieve it.
92
- return sos.offline.cache.loadContent('ApplicationSecret');
93
- })
94
- .then((content) => {
95
- console.log('Loaded', content); // print 123SuperSecretHash
96
-
97
- // Let's delete the content now
98
- return sos.offline.cache.deleteContent('ApplicationSecret')
99
- })
100
- .then(() => {
101
- console.log("Deleted");
102
- })
103
- .catch((error) => { console.error(error); });
104
- ```
105
-
106
- ## Usage with Typescript
107
- You can also use all these methods with [signageOS TypeScript](https://docs.signageos.io/hc/en-us/articles/4405069154962#signageos-typescript).
108
-
109
- ```typescript
110
- loadContent(uid: string): Promise<string>;
111
- saveContent(uid: string, content: string): Promise<void>;
112
-
113
- listContents(): Promise<string[]>;
114
- deleteContent(uid: string): Promise<void>;
115
- ```
116
-
117
- ## Errors
118
- Although we are doing our best, following errors may occur when working with the offline cache.
119
-
120
-
121
- | Code | Type | Message |
122
- | ---- | ---- | ------- |
123
- | 41001 | AppletNativeCacheError | Already saving the file with UID: ```uid``` |
124
- | 51001 | InternalNativeCacheError | Couldn't not read the files from the offline cache. |
125
- | 51001 | InternalNativeCacheError | Couldn\'t load the file from offline cache. |
126
- | 51001 | InternalNativeCacheError | Couldn\'t load the file before deleting it. |
127
- | 51002 | InternalNativeCacheError | Couldn\'t save the file to the offline cache. |
128
- | 51003 | InternalNativeCacheError | File wasn\'t deleted correctly. |
129
- | 40901 | AppletOfflineCacheError | Uid contains invalid characters, allowed: $$ALLOWED_CHARS$$, got $$ACTUAL_UID$$
@@ -1,32 +0,0 @@
1
- ---
2
- title: OSD
3
- author: Patrik Bily
4
- date: 24.10.2022
5
- type: js-api
6
- tags:
7
- - applet
8
- - applet_api
9
- - api
10
- - osd
11
- - js_api
12
- description: "[Content JS API] OSD API allows you to open OSD."
13
- ---
14
-
15
- # OSD
16
-
17
- OSD API allows you to open OSD for initial setup with applet.
18
-
19
- ## All methods
20
-
21
- | Method | Description | Supported since |
22
- | ------------------ | ---------------------- | :-------------: |
23
- | `showOSD()` |Open OSD on the display | 5.5.0 |
24
-
25
- ## showOSD()
26
-
27
- This method allow you to open OSD through the JS API without typing the pin.
28
-
29
- ### Javascript example
30
- ```javascript
31
- await sos.osd.showOSD();
32
- ```
@@ -1,60 +0,0 @@
1
- ---
2
- title: Proof of Play
3
- author: Robert Pecha
4
- date: 31.01.2023
5
- type: js-api
6
- tags:
7
- - applet
8
- - applet_api
9
- - api
10
- - js_api
11
- description: "[Content JS API] You can use our Prooof of Play mechanism to log that some content was played on end device successfully or not. Our system includes important metadata about applet and device out-of-box to simplify solution of issues with content. You can use SignageOS to analyze, if, where, when and how long proposed content was playing in front of audience."
12
- ---
13
-
14
- ## All methods
15
-
16
- | Methods | Description | Supported since |
17
- | ----------- | ------------ | -----------|
18
- | `recordItemPlayed()` | Log that content was played successfully | 5.5.1 |
19
-
20
- ## recordItemPlayed()
21
-
22
- Send provided information about played content along with additional metadata about current applet and device to SignageOS.
23
-
24
- ### Parameters
25
-
26
-
27
- | Param | Type | Required | Description |
28
- | --------- | ------ | :------------------------: | -------------------------------------------------- |
29
- | `options` | Object | <div class="red">Yes</div> | Object containing information about played content
30
-
31
- ### Options
32
-
33
- Here is the options object defined as Typescript interface:
34
-
35
- ```typescript
36
- interface IRecordItemOptions {
37
- name: string;
38
- customId?: string;
39
- type?: 'video' | 'image' | 'html' | 'custom';
40
- tags?: string[];
41
- fileName?: string;
42
- playbackSuccess?: boolean;
43
- errorMessage?: string;
44
- }
45
- ```
46
-
47
- ### Javascript example
48
- ```javascript
49
-
50
- await sos.proofOfPlay.recordItemPlayed({
51
- name: 'tesla-commercial-ad-christmas-campaign',
52
- customId: 'dBE43bFB3312VFfvd34bgGHJVV334cd2',
53
- type: 'video',
54
- tags: ['tesla', 'christmas'],
55
- fileName: 'tesla.mp4',
56
- playbackSuccess: false,
57
- errorMessage: 'Unsupported framerate 60fps',
58
- });
59
-
60
- ```
@@ -1,70 +0,0 @@
1
- ---
2
- title: Sensors
3
- author: Michal Artazov
4
- date: 28.9.2020
5
- type: js-api
6
- tags:
7
- - applet
8
- - applet_api
9
- - api
10
- - js_api
11
- - sensors
12
- description: "[Content JS API] We don't directly provide any sensors API but we provide a set of tools to implement your own integration of the hardware that you want to use."
13
- ---
14
-
15
- # Sensors
16
-
17
- We don't directly provide any sensors API but we provide a set of tools to implement your own integration of
18
- the hardware that you want to use.
19
-
20
- ## Sensors interfaces
21
-
22
- We provide a set of interfaces, that any integration should implement.
23
- If every implementation implements the same set of interfaces, it's easy to swap it for a different implementation.
24
- It also requires less code to be written to use various types of hardware.
25
- If possible, you should always implement these interfaces.
26
-
27
- :::info
28
- Right now, the list of interfaces is very short. We will be adding more types soon.
29
- If there's any particular type of interfaces you'd like, kindly let us know.
30
- :::
31
-
32
- ### Button
33
-
34
- A regular button, that can be pressed or released.
35
-
36
- ```typescript
37
- interface IButton {
38
- isPressed(): Promise<boolean>;
39
- on(event: 'pressed' | 'released', listener: () => void): void;
40
- }
41
- ```
42
-
43
- ### RFID Antenna
44
-
45
- Antenna that detects presence of RFID tags. An RFID tag is simply a number.
46
- Whenever a tag is placed at close proximity to the antenna, it will emit a `placed` event.
47
- Whenever a tag is picked and is no longer detected by the antenna, it will emit a `picked` event.
48
-
49
- ```typescript
50
- interface IRfidAntenna {
51
- getPlacedTags(): Promise<number[]>;
52
- on(event: 'picked' | 'placed', listener: (rfidTag: number) => void): void;
53
- }
54
- ```
55
-
56
- ## Ready to use integrations
57
-
58
- We already did the hard work for you and implemented some of the popular hardware. All you have to do is use it in your project.
59
- For more information read [this article](https://docs.signageos.io/hc/en-us/articles/4405231196946-Supported-devices-for-Sensors-usage).
60
-
61
- ## Writing your own implementation
62
-
63
- Sometimes you might want to use hardware that we don't support out of the box yet.
64
-
65
- Firstly, you will need to read the documentation for the [serial API](js-serial).
66
- Most often, the hardware you will decide to use connects to the device via USB and internally uses a serial communication, like RS232.
67
- In that case you will use the serial API.
68
-
69
- You can approach this any way you like, but remember that you should always implement the [interfaces defined by us](js-sensors#sensors-interfaces).
70
- That will allow for greater code reusability and readability.
@@ -1,165 +0,0 @@
1
- ---
2
- title: Serial Port
3
- author: Michal Artazov
4
- date: 25.9.2020
5
- type: js-api
6
- tags:
7
- - applet
8
- - applet_api
9
- - api
10
- - serial
11
- - js_api
12
- description: "[Content JS API] Some platforms support connecting hardware via serial port, either directly via UART or via USB. This can be leveraged to integrate a wide variety of hardware into your digital signage application."
13
- ---
14
-
15
- # Serial
16
-
17
- Some platforms support connecting hardware via serial port, either directly via UART or via USB.
18
- This can be leveraged to integrate a wide variety of hardware into your digital signage application.
19
-
20
- Such hardware could be, for example, printers, payment terminals or sensors.
21
-
22
- :::warning
23
- * Before using this API, ensure that the display supports serial via `sos.display.supports("SERIAL")`.
24
- * More info [**HERE**](js-display#supports).
25
- * Samsung Kiosk serial connection only works over serial ports, not over USB ports
26
- :::
27
-
28
- ## All methods
29
-
30
-
31
- | Method | Description | Supported since |
32
- | ------------------ | ---------------------- | :-------------: |
33
- | `openSerialPort()` | Open a new serial port | 4.4.0
34
-
35
- ## openSerialPort()
36
-
37
- Creates a new instance of serial port. You can then use that instance to handle the communication.
38
-
39
-
40
- | Param | Type | Required | Description |
41
- | --------- | ------ | :------------------------: | -------------------------------------------------- |
42
- | `options` | Object | <div class="red">Yes</div> | Object containing configuration of the serial port
43
-
44
- ### Options
45
-
46
- | Property | Type | Required | Description |
47
- | -------- | ------ | -------- | -------- |
48
- | `device` | String | No | Specifies the device address |
49
- | `baudRate` | Number | Yes | Specifies the data transmission speed in bits per second |
50
- | `parity` | **none**, **even**, **mark** or **space** | No | Specifies the form of error checking, whether (or what) extra bits are added to a byte |
51
- | `databits` | Number | No | Specifies the number of bits in a byte |
52
- | `stopbits` | Number | No | Specifies the number of bits used to signal the end of a communication packet |
53
- | `rtscts` | Boolean | No | Enables or disables RTS/CTS handshaking over the serial port. Currently supported by selected models of BrightSign |
54
- :::
55
-
56
- Here is the options object defined as Typescript interface:
57
-
58
- ```typescript
59
- interface ISerialPortOptions {
60
- device?: string;
61
- baudRate: number;
62
- parity?: 'none' | 'even' | 'mark' | 'odd' | 'space';
63
- databits?: number;
64
- stopbits?: number;
65
- rtscts?: boolean;
66
- }
67
- ```
68
-
69
- ### Javascript example
70
- ```javascript
71
- // Open default serial port based platform
72
- const serialPort = await sos.hardware.openSerialPort({
73
- baudRate: 115200,
74
- });
75
-
76
- // Open specific serial port
77
- const serialPort = await sos.hardware.openSerialPort({
78
- device: '/dev/ttyUSB0',
79
- baudRate: 115200,
80
- });
81
- ```
82
-
83
- :::info
84
- Device address is different per platform (at least for now). Kindly find the respective device address:
85
-
86
- | Device type | Default value | Other values for `device` |
87
- | ----------- | ---------- | ----------------- |
88
- | RaspberryPi / Linux | `/dev/ttyUSB0` | `/dev/ttyUSB0` |
89
- | Windows | `COM3` | `COM3` (typically, but check your Win machine if this does not work) |
90
- | Samsung Kiosk | `PORT1` |`PORT1`, `PORT2`, `PORT3` |
91
- | Android | `/dev/ttyusb0` | `/dev/ttyusb0` |
92
- | BrightSign | `0` | `0` (Serial jack /dev/ttyS0), `1` (GPIO port /dev/ttyS1), `USB:A/0` (USB-to-serial /dev/ttyUSB0) |
93
-
94
- ## Serial port methods
95
-
96
- Once you create a serial port instance using `openSerialPort()` method listed above,
97
- you can call following methods on it.
98
-
99
-
100
- | Method | Description | Supported since |
101
- | ---------- | ----------------------------------------------------------- | :-------------: |
102
- | `onData()` | Call a listener callback anytime the opened serial port receiving data. | 4.4.0 |
103
- | `write()` | Write data to the serial port | 4.4.0 |
104
- | `close()` | Close serial port | 4.4.0
105
-
106
- ## onData()
107
-
108
- Call a listener callback anytime the opened serial port receiving data.
109
- The listener will stop if the serial port is closed.
110
-
111
- Since data may be either text or binary, it's emitted as [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)
112
- and should be processed further according to the requirements of your application.
113
-
114
- ### Javascript example
115
- In case of binary data:
116
- ```javascript
117
- // serial port instance previously created via sos.hardware.openSerialPort()
118
- serialPort.onData((data) => {
119
- // data is array of numbers so can be processed as binary
120
- });
121
- ```
122
-
123
- In case of text data:
124
- ```javascript
125
- // serial port instance previously created via sos.hardware.openSerialPort()
126
- serialPort.onData((data) => {
127
- const dataString = [...data].map((char) => String.fromCharCode(char)).join('');
128
- });
129
- ```
130
-
131
- ## write()
132
-
133
- Write data to the serial port. The data can be a string of hexadecimal digits, array of numbers or [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array). And converted to hexadecimals
134
-
135
- ### Javascript example
136
- ```javascript
137
- // serial port instance previously created via sos.hardware.openSerialPort()
138
- await serialPort.write('68656c6c6f'); // hexadecimal string
139
- await serialPort.write([ 10, 20, 30, 40 ]); // array of numbers
140
- await serialPort.write(Uint8Array.from([ 10, 20, 30, 40 ])); // Uint8Array
141
- ```
142
-
143
- ## close()
144
-
145
- Close serial port and prevent any more communication
146
-
147
- ### Javascript example
148
- ```javascript
149
- // serial port instance previously created via sos.hardware.openSerialPort()
150
- await serialPort.close();
151
- ```
152
-
153
- ## Errors
154
-
155
- Following errors may occur when working with the serial ports. However they don't reflect on actual physical connectivity of the ports due to Samsung b2bapi does not register these events.
156
-
157
-
158
-
159
- | Code | Type | Message |
160
- | ----- | --------------------- | ----------------------------------------- |
161
- | 50602 | InternalHardwareError | Failed to open serial port |
162
- | 50603 | InternalHardwareError | Closing serial port that isn't open |
163
- | 50603 | InternalHardwareError | Failed to close serial port |
164
- | 50604 | InternalHardwareError | Writing to a serial port that isn't open |
165
- | 50604 | InternalHardwareError | Failed to write to serial port