- Many fixes to tas code
- fixes to amor writing and status code - edited ecbcounter to stop at no beam - updated documentation - fixed a bug in project code affecting SANS
This commit is contained in:
@ -143,6 +143,11 @@ int readRS232(prs232 self, void *data, int *dataLen)
|
||||
return NOTCONNECTED;
|
||||
}
|
||||
|
||||
/*
|
||||
clean our space in order to prevent corrupted stuff
|
||||
*/
|
||||
memset(data,0,*dataLen);
|
||||
|
||||
iRet = NETAvailable(self->pSock,self->timeout);
|
||||
if(iRet < 0)
|
||||
{
|
||||
@ -395,7 +400,7 @@ int RS232Action(SConnection *pCon, SicsInterp *pSics,
|
||||
char pError[256];
|
||||
char pBuffer[8192], pReply[8192];
|
||||
char *pPtr = NULL;
|
||||
int iRet, iRead = 8191;
|
||||
int iRet, iRead = 8191, count, i;
|
||||
|
||||
self = (prs232)pData;
|
||||
assert(self);
|
||||
@ -531,6 +536,30 @@ int RS232Action(SConnection *pCon, SicsInterp *pSics,
|
||||
SCWrite(pCon,pReply,eValue);
|
||||
return 1;
|
||||
}
|
||||
else if(strcmp(argv[1],"binwrite") == 0)
|
||||
{
|
||||
count = argc - 2;
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
pBuffer[i] = (char)atoi(argv[i+2]);
|
||||
}
|
||||
if(self->pSock)
|
||||
{
|
||||
iRet = NETWrite(self->pSock,pBuffer,count);
|
||||
}
|
||||
else
|
||||
{
|
||||
iRet = NOTCONNECTED;
|
||||
}
|
||||
if(iRet < 0)
|
||||
{
|
||||
getRS232Error(iRet,pError,255);
|
||||
SCWrite(pCon,pError,eError);
|
||||
return 0;
|
||||
}
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
}
|
||||
else if(strcmp(argv[1],"init") == 0)
|
||||
{
|
||||
iRet = initRS232(self);
|
||||
|
Reference in New Issue
Block a user