8 #ifndef __ETHUPDATER_H__
9 #define __ETHUPDATER_H__
12 #include "EoUpdaterProtocol.h"
32 unsigned char mRxBuffer[uprot_UDPmaxsize];
33 unsigned char mTxBuffer[uprot_UDPmaxsize];
56 bool create(ACE_UINT16 port,ACE_UINT32 address)
60 mBroadcast=mMyAddress|0x0000FFFF;
62 return mSocket.
Create(mPort,mMyAddress);
65 bool create(ACE_UINT16 port,std::string& address)
68 ACE_UINT32 ip1,ip2,ip3,ip4;
69 sscanf(address.c_str(),
"%d.%d.%d.%d",&ip1,&ip2,&ip3,&ip4);
70 mMyAddress=(ip1<<24)|(ip2<<16)|(ip3<<8)|ip4;
71 mBroadcast=mMyAddress|0x0000FFFF;
73 return mSocket.
Create(mPort,mMyAddress);
83 bool isCmdSupported(eOuprot_proc_capabilities_t capability, ACE_UINT32 address = 0);
108 std::string cmdGetMoreInfo(
bool refreshInfo =
false, ACE_UINT32 address = 0);
114 bool cmdInfo32Clear(ACE_UINT32 address = 0);
119 bool cmdInfo32Set(
const string &info32, ACE_UINT32 address = 0);
124 vector<string> cmdInfo32Get(ACE_UINT32 address = 0);
129 bool cmdRestart(ACE_UINT32 address = 0);
134 bool cmdSetDEF2RUN(eOuprot_process_t process, ACE_UINT32 address = 0);
139 bool cmdJumpUpd(ACE_UINT32 address = 0);
144 bool cmdJump2ROMaddress(uint32_t romaddress, ACE_UINT32 address = 0);
149 bool cmdBlink(ACE_UINT32 address = 0);
155 bool cmdEraseEEPROM(ACE_UINT32 address = 0);
162 bool cmdReadEEPROM(uint16_t from, uint16_t size, ACE_UINT32 address, uint8_t **value);
168 bool cmdChangeAddress(ACE_UINT32 newaddress, ACE_UINT32 address = 0);
176 std::string cmdProgram(FILE *programFile,
int partition,
void (*updateProgressBar)(
float), ACE_UINT32 address = 0);
180 void sendCommandSelected(
void *
cmd, uint16_t len);
181 int sendPROG(
const uint8_t opc,
void *
data,
int size,
int answers,
int retry);
191 bool cmdChangeMask(ACE_UINT32 newMask, ACE_UINT32 address = 0);
197 bool cmdChangeMAC(uint64_t newMAC48, ACE_UINT32 address);
199 bool cmdPageClr(eOuprot_pagesize_t pagesize, ACE_UINT32 address = 0);
200 bool cmdPageSet(eOuprot_pagesize_t pagesize, uint8_t *
data, ACE_UINT32 address = 0);
201 bool cmdPageGet(eOuprot_pagesize_t pagesize, uint8_t **
data, ACE_UINT32 address);
bool Create(ACE_UINT16 port, std::string &address)
static const int partition_LOADER
bool create(ACE_UINT16 port, ACE_UINT32 address)
static const int partition_APPLICATION
bool create(ACE_UINT16 port, std::string &address)
static const int partition_UPDATER
BoardList & getBoardList()