| 150 | === !SetDebugRawRead === |
| 151 | |
| 152 | {{{ |
| 153 | void SetDebugRawRead(bool bDebugShowRawRead) |
| 154 | }}} |
| 155 | |
| 156 | ==== Parameters ==== |
| 157 | |
| 158 | * bDebugShowRawRead - true to enable console output showing read data, false to disable |
| 159 | |
| 160 | ==== Description ==== |
| 161 | |
| 162 | This is only compiled for DEBUG build so must be wrapped with precompile options to only call this function when DEBUG defined. |
| 163 | |
| 164 | ==== Example ==== |
| 165 | |
| 166 | {{{ |
| 167 | CComm *pComm = NULL; |
| 168 | |
| 169 | void StartCommunications(void) |
| 170 | { |
| 171 | int commPort = 2; |
| 172 | CCommSerial *pSerial = new CCommSerial(commPort); |
| 173 | pComm = pSerial; |
| 174 | |
| 175 | pComm->Open(); |
| 176 | |
| 177 | pComm->AddRcvEvent(CHR_STX, CHR_ETX, NAME_COMM_EVENT(DataMsg), 0, NULL); |
| 178 | |
| 179 | #if defined(DEBUG) |
| 180 | // Helpful for initial development to see all characters received on the port |
| 181 | pComm->SetDebugRawRead(true); |
| 182 | #endif |
| 183 | } |
| 184 | |
| 185 | |
| 186 | }}} |