+ // --------------------- Direct Write
+ //------------------------------------------------------------------------------------------
+
+ if ((s=getArg("x"))!="") {
+ std::vector<uint8_t> v;
+ int sp=0;
+ std::string ts="";
+ for ( std::string::iterator it = s.begin() ; it < s.end(); it++ ,sp++) {
+ if (isxdigit(*it)) {
+ char c=(*it);
+ ts.append(1,c);
+ if (ts.length()>=2) {
+ v.push_back(strtoul(ts.c_str(),NULL, 16));
+ ts="";
+ }
+ }
+ }
+ if (ts.length()!=0) {
+ v.push_back(strtoul(ts.c_str(),NULL, 16));
+ }
+ printf("Send ");
+ for (uint8_t val :v) printf("%02X ",val);
+ printf(" to selected Device\n");
+ int sel=selectDevice();
+ if (sel==0) exit(0);
+ sel-=1;
+ owDevice* dev=owi->devices[sel];
+ dev->Communicate(&v,v.size(),0);
+ for (uint8_t val :v) printf("%02X ",val);
+ printf("\n");
+ exit(0);
+
+
+ }
+
+ //------------------------------------------------------------------------------------------
+ // --------------------- Memory functions
+ //------------------------------------------------------------------------------------------
+
+=======