JavaScript consumer library for the Simple Device Drawing Protocol
TBD
newrequire('sddp-javascript-consumer')('sddp.ConsumerA','sddpExample',{host: '...',password: '...'}).connect(process.argv.pop()||'sddp.Display1').then((display)=>{display.clear()display.writeAt(3,0,'Hello')display.writeAt(4,1,'World!')consttimeStr=newDate().toLocaleTimeString()display.writeAt(20-timeStr.length,3,timeStr)display.disconnect()}).catch((err)=>{console.error('Connection failed:',err)process.exit(-1)})A trace of the traffic generated by the execution of this script is shown here.
On an LCM2004A 4x20 character display, execution of the above would result in:
