Hello, I added new functions to the SDK, now it is even more simple to add new functions/constants/variables:
Here are the extended functions:
// R/W variables
{ "CH1.Enabled", CEvalToken::PrecedenceVar, _Ch1Enabled },
{ "CH1.Coupling", CEvalToken::PrecedenceVar, _Ch1Coupling },
{ "CH1.Resolution", CEvalToken::PrecedenceVar, _Ch1Resolution },
{ "CH1.Probe", CEvalToken::PrecedenceVar, _Ch1Probe },
{ "CH1.Position", CEvalToken::PrecedenceVar, _Ch1Position },
{ "CH1.Color", CEvalToken::PrecedenceVar, _Ch1Color },
{ "CH2.Enabled", CEvalToken::PrecedenceVar, _Ch1Enabled },
{ "CH2.Coupling", CEvalToken::PrecedenceVar, _Ch1Coupling },
{ "CH2.Resolution", CEvalToken::PrecedenceVar, _Ch1Resolution },
{ "CH2.Probe", CEvalToken::PrecedenceVar, _Ch1Probe },
{ "CH2.Position", CEvalToken::PrecedenceVar, _Ch1Position },
{ "CH2.Color", CEvalToken::PrecedenceVar, _Ch1Color },
{ "CH3.Enabled", CEvalToken::PrecedenceVar, _Ch3Enabled },
{ "CH3.Polarity", CEvalToken::PrecedenceVar, _Ch3Polarity },
{ "CH3.Position", CEvalToken::PrecedenceVar, _Ch3Position },
{ "CH3.Color", CEvalToken::PrecedenceVar, _Ch3Color },
{ "CH4.Enabled", CEvalToken::PrecedenceVar, _Ch4Enabled },
{ "CH4.Polarity", CEvalToken::PrecedenceVar, _Ch4Polarity },
{ "CH4.Position", CEvalToken::PrecedenceVar, _Ch4Position },
{ "CH4.Color", CEvalToken::PrecedenceVar, _Ch4Color },
{ "TIME.Resolution", CEvalToken::PrecedenceVar, _TimeResolution },
{ "TRIG.Sync", CEvalToken::PrecedenceVar, _TrigSync },
{ "TRIG.Type", CEvalToken::PrecedenceVar, _TrigType },
{ "TRIG.Source", CEvalToken::PrecedenceVar, _TrigSource },
{ "TRIG.State", CEvalToken::PrecedenceVar, _TrigState },
{ "TRIG.Level", CEvalToken::PrecedenceVar, _TrigLevel },
{ "DISP.Axes", CEvalToken::PrecedenceVar, _DispAxes },
{ "DISP.Draw", CEvalToken::PrecedenceVar, _DispDraw },
{ "DISP.Average", CEvalToken::PrecedenceVar, _DispAverage },
{ "DISP.Persist", CEvalToken::PrecedenceVar, _DispPersist },
{ "DISP.Grid", CEvalToken::PrecedenceVar, _DispGrid },
{ "DISP.Axis", CEvalToken::PrecedenceVar, _DispAxis },
{ "SPEC.Window", CEvalToken::PrecedenceVar, _SpecWindow },
{ "SPEC.Display", CEvalToken::PrecedenceVar, _SpecDisplay },
{ "RUN.Backlight", CEvalToken::PrecedenceVar, _RunBacklight },
{ "RUN.Volume", CEvalToken::PrecedenceVar, _RunVolume },
// functions
{ "About", CEvalToken::PrecedenceFunc, _About },
{ "Help", CEvalToken::PrecedenceFunc, _Help },
{ "WND.Message", CEvalToken::PrecedenceFunc, _WndMessage },
{ "WND.Dump", CEvalToken::PrecedenceFunc, _WndDump }, // output only through uart
{ "ADC.Transfer", CEvalToken::PrecedenceFunc, _AdcTransfer }, // output only through uart
// constants
{ "WND::WmPaint", CEvalToken::PrecedenceConst, _WndWmPaint },
{ "WND::WmKey", CEvalToken::PrecedenceConst, _WndWmKey },
{ "WND::WmTick", CEvalToken::PrecedenceConst, _WndWmTick },
{ "WND::WmBroadcast", CEvalToken::PrecedenceConst, _WndWmBroadcast },
{ "WND::WsHidden", CEvalToken::PrecedenceConst, _WndWsHidden },
{ "WND::WsVisible", CEvalToken::PrecedenceConst, _WndWsVisible },
{ "WND::WsNoActivate", CEvalToken::PrecedenceConst, _WndWsNoActivate },
{ "WND::WsModal", CEvalToken::PrecedenceConst, _WndWsModal },
{ "WND::WsTick", CEvalToken::PrecedenceConst, _WndWsTick },
{ "WND::WsListener", CEvalToken::PrecedenceConst, _WndWsListener },
{ "KEY::Left", CEvalToken::PrecedenceConst, _KeyLeft },
{ "KEY::Right", CEvalToken::PrecedenceConst, _KeyRight },
{ "KEY::Up", CEvalToken::PrecedenceConst, _KeyUp },
{ "KEY::Down", CEvalToken::PrecedenceConst, _KeyDown },
{ "KEY::Enter", CEvalToken::PrecedenceConst, _KeyEnter },
{ "KEY::Escape", CEvalToken::PrecedenceConst, _KeyEscape },
{ "KEY::F1", CEvalToken::PrecedenceConst, _KeyF1 },
{ "KEY::F2", CEvalToken::PrecedenceConst, _KeyF2 },
{ "KEY::F3", CEvalToken::PrecedenceConst, _KeyF3 },
{ "KEY::F4", CEvalToken::PrecedenceConst, _KeyF4 },
// others
{ "SET.Core.bUartTest", CEvalToken::PrecedenceVar, _SetCoreUartTest },
{ "SET.Core.bUartEcho", CEvalToken::PrecedenceVar, _SetCoreUartEcho },
{ "MENU.Item", CEvalToken::PrecedenceVar, _MenuItem },
{ "SET.Save", CEvalToken::PrecedenceFunc, _SetSave },
{ "SET.Load", CEvalToken::PrecedenceFunc, _SetLoad },
{ "SET.Reset", CEvalToken::PrecedenceFunc, _SetReset },
{ "ADC.Update", CEvalToken::PrecedenceFunc, _AdcUpdate },
{ "TRIG.Update", CEvalToken::PrecedenceFunc, _TrigUpdate },
{ "CORE.Update", CEvalToken::PrecedenceFunc, _CoreUpdate },
{ "GEN.Update", CEvalToken::PrecedenceFunc, _GenUpdate2 },
{ "LCD.Update", CEvalToken::PrecedenceFunc, _LcdUpdate },
{ "ADC.ResetWritePtr", CEvalToken::PrecedenceFunc, _AdcResetWritePtr },
{ "ADC.GetWritePtr", CEvalToken::PrecedenceFunc, _AdcGetWritePtr },
{ "ADC.Enabled", CEvalToken::PrecedenceVar, _AdcEnabled },
{ "BIOS.Get", CEvalToken::PrecedenceFunc, _BiosGet },
{ "BIOS.Set", CEvalToken::PrecedenceFunc, _BiosSet },
Later I will add some comments how to use them. Now it is possible to send keystrokes to the app and control the cursor:
WND.Message( WND::WmKey, KEY::Down);
or set the menu item:
MENU.Item=4;
WND.Dump dumps all the window tree as json string
Help(); lists all of possible commands.
I am using Putty to connect to the DSO and then set SET.Core.bUartEcho=1 to see what I am typing, then SET.Core.bUartTest=0 to stop sending test messages every second. Becuase all strings are terminated only with \n, in putty I set Change Settingsā¦->Terminal->Implicit CR in every LF to get readable result
Implementation of these new commands can be found here:
https://github.com/gabonator/DS203/blob/master/Source/Core/SdkV1.h