ROBOTC.net forums
http://robotc.net/forums/

Dexter Industries Websockets Example Compile Issues
http://robotc.net/forums/viewtopic.php?f=1&t=10262
Page 1 of 1

Author:  eat-sleep-code [ Wed Jan 14, 2015 10:20 pm ]
Post subject:  Dexter Industries Websockets Example Compile Issues

I downloaded the example Websockets files linked at the bottom: http://www.dexterindustries.com/manual/ ... b-browser/

I opened up DIWIFI-Websocket-Chrome.c and DIWIFI-Websocket-Chrome.h, hit Compile Program and got 71 errors. :-(

Code:
File "C:\Users\Person\Documents\Robotics\Programs\DIWIFI-Websocket-Chrome.c" compiled on Jan 14 2015 19:17:36
*Warning*:Substituting similar variable 'playSound' for 'PlaySound'. Check spelling and letter case.
*Warning*:Substituting similar variable 'stopAllTasks' for 'StopAllTasks'. Check spelling and letter case.
*Warning*:Substituting similar variable 'playSound' for 'PlaySound'. Check spelling and letter case.
*Warning*:Substituting similar variable 'stopAllTasks' for 'StopAllTasks'. Check spelling and letter case.
*Warning*:Substituting similar variable 'stringFind' for 'StringFind'. Check spelling and letter case.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'newline' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'newline' of type 'ubyte [2]'.
**Error**:'*' Indirection levels mismatch. Call to 'memset'. Parameter: 'void * pToBuffer' is 'buff[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'buff[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'pData' of type 'ubyte &'.
**Error**:'*' Indirection levels mismatch. Call to 'memcpy'. Parameter: 'void * pToBuffer' is 'buf[index]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
**Error**:'const' expressions does not fit. Call to 'find_and_print'. Parameter: 'unsigned string & findme' is '"WebSocket-Key: "' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
*Warning*:Symbol 'nxtDisplayString' is 'deprecated' definition. There may be alternate symbol with equivalent functionality.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"AT+DNSLOOKUP="' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"www."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"dexterindustries"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '".com"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"AT+NCTCP="' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteStart2' of type 'ubyte [3]'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"GET "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"http://"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"www."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"dexterindustries."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"com"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"/websocket/"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"calc2.php"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"?"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"name="' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'ubyte'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '" HTTP"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"/1.1"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Host: "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"www."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"dexterindustries."' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"com"' of type 'string'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteEnd' of type 'ubyte [3]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Array size mismatch. Call to 'memset'. Parameter: 'const char nValue' is 'websocketBuff' of type 'ubyte [128]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'nData[i]' of type 'ubyte'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Array size mismatch. Call to 'appendToBuff'. Parameter: 'const ubyte & pData' is 'listen_cmd' of type 'ubyte [11]'.
**Error**:Array size mismatch. Call to 'appendToBuff'. Parameter: 'const ubyte & pData' is 'newline' of type 'ubyte [1]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteStart' of type 'ubyte [3]'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"HTTP/1.1 101 "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Switching "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Protocols"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Upgrade: "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"websocket"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Connection: "' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Upgrade"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Sec-WebSocket-"' of type 'string'.
**Error**:'const' expressions does not fit. Call to 'writeStr'. Parameter: 'unsigned string & sData' is '"Accept: "' of type 'string'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'ubyte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteEnd' of type 'ubyte [3]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'starttx' of type 'ubyte [3]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'byteData' of type 'byte'.
**Error**:Expression does not fit parameter. Call to 'nxtWriteRawHS'. Parameter: 'char * pData' is 'endtx' of type 'ubyte [2]'.
**Error**:'*' Indirection levels mismatch. Call to 'nxtReadRawHS'. Parameter: 'ubyte * pData' is 'BytesRead[0]' of type 'ubyte'.
*Warning*:Substituting similar variable 'stringFromChars' for 'StringFromChars'. Check spelling and letter case.
**Error**:Procedure call Parameters don't match declaration for 'stringFromChars(unsigned string & sToString, char * pFromChars)'


I am running RobotC 4.27. Any direction as to why this example program didn't work would be helpful.

Attachments:
DIWIFI-Websocket-Chrome.h [25.56 KiB]
Downloaded 277 times
DIWIFI-Websocket-Chrome.c [2.8 KiB]
Downloaded 405 times

Author:  eat-sleep-code [ Sat Jan 24, 2015 3:41 pm ]
Post subject:  Re: Dexter Industries Websockets Example Compile Issues

Anyone?

Author:  mightor [ Sun Jan 25, 2015 4:39 am ]
Post subject:  Re: Dexter Industries Websockets Example Compile Issues

It was written for ROBOTC 3.x, so you'll have to go through all the errors and fix them and convert them to ROBOTC 4.x function calls. Some will be easier than others.

= Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/