Skip to content

Commit

Permalink
Accidently committed untested new feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbs38 committed Oct 17, 2017
1 parent 91c4683 commit 84eafb7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
23 changes: 0 additions & 23 deletions yaMBSiavr.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,26 +404,3 @@ uint8_t modbusExchangeBits(volatile uint8_t *ptrToInArray, uint16_t startAddress
return 0;
}
}

/* @brief: Handles function code "report slave id".
*
* Arguments: - in: MUST BE NULL-TERMINATED and shorter than MaxFrameIndex-4
* (without NULL-Byte, the NULL-Byte is not transmitted).
* Pointer to the user's data array containing user specific
* information, typically a string (hence the null termination).
* The last byte should (according to spec) contain the 'run indication"
* (running: 0xFF, not running: 0x00). This seems to be originating
* from PLC terminology and is often omitted nowadays.
*
* @example: char myDeviceDescription[] = {"modbus capable device that is always running V1.0\0xFF\0x00"}
* modbusSendSlaveID(myDeviceDescription);
*/
void modbusSendSlaveID(char *in) {
uint8_t c = 0;
for (;(c<(MaxFrameIndex-2)) && in[c]!=0;c++)
{
rxbuffer[c+3]=in[c];
}
rxbuffer[2]=c+1; //byte count
modbusSendMessage(c+2);
}
15 changes: 0 additions & 15 deletions yaMBSiavr.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,18 +331,3 @@ extern uint8_t modbusExchangeBits(volatile uint8_t *ptrToInArray, uint16_t start
*
*/
extern uint8_t modbusExchangeRegisters(volatile uint16_t *ptrToInArray, uint16_t startAddress, uint16_t size);

/* @brief: Handles function code "report slave id".
*
* Arguments: - in: MUST BE NULL-TERMINATED and shorter than MaxFrameIndex-4
* (without NULL-Byte, the NULL-Byte is not transmitted).
* Pointer to the user's data array containing user specific
* information, typically a string (hence the null termination).
* The last byte should (according to spec) contain the 'run indication"
* (running: 0xFF, not running: 0x00). This seems to be originating
* from PLC terminology and is often omitted nowadays.
*
* @example: char myDeviceDescription[] = {"modbus capable device that is always running V1.0\0xFF\0x00"}
* modbusSendSlaveID(myDeviceDescription);
*/
extern void modbusSendSlaveID(char *in);

0 comments on commit 84eafb7

Please sign in to comment.