LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SOLVED: LW2017: Documentation Tags for Source Code only including first function in the file.

Solved!
Go to solution

Today I tried out the "documentation from source code" feature in LabWindows 2017. Using Shift-Ctrl-G before a function, it spits out the template for me to customize. Nice.

 

But, even though I have multiple functions in the file, each with the template, it only generates the XML/HTML for the first function:

 

 

/// HIFN Create a message structure with buffer populated and ready to be sent to the receiver.
/// HIRET Copy of the newly created message structure.
/// HIPAR type/Message type byte.
/// HIPAR systemState/System state byte.
/// HIPAR commandCode/Command code byte.
/// HIPAR dataBytesPtr/Pointer to data bytes, or NULL if none.
/// HIPAR numDataBytes/Number of data bytes byte, or 0 if none.
MessageStruct CreateMessage (uint8_t type, uint8_t systemState,
							 uint8_t commandCode,
							 void *dataBytesPtr, uint8_t numDataBytes)
{
	...
}


/// HIFN This returns a BufferStruct with the buffer data being the series of bytes representing the complete message with header, dataBytes and checksum at the end.
/// HIRET Copy of the newly created buffer structure.
/// HIPAR msg/Message structure.
BufferStruct BuildBufferFromMessage (MessageStruct msg)
{
	...
}


/// HIFN This will populate a MessageStruct and return it. This is the "safe" version of the call which uses a BufferStruct copy passed in. This avoids any chance of a crash due to a bad pointer or size count. It is safe to use, and the "FromBytes" version should only be used if speed is more important than safety.
/// HIRET Copy of the newly created buffer structure.
/// HIPAR buf/Buffer structure.
MessageStruct BuildMessageFromBuffer (BufferStruct buf)
{
	...
}

 

 

 

Is there a limit to one function per file with this feature? Or something else I need to do?

 

Also, if I use multiple //HIFN lines for my help (to keep the source code nice) it seems to split up the help on those shorter lines, and I have to put it all one one line to let the help file wrap it as needed. Is there a way to specify "text continues"? I tried backslash, but that did not work:

 

///HIFN This is my help file that I want

///HIFN to just be on one line...

 

Thanks, much.

0 Kudos
Message 1 of 2
(1,166 Views)
Solution
Accepted by topic author AllenInIowa

SOLVED: It appears a blank line must be before the tags in some cases. This works:

 

// "But if safety and simplicity are the primary concerns, passing structures
// by value is generally the safer approach."
/// HIFN Create a message structure with buffer populated and ready to be sent to the receiver.
/// HIRET Copy of the newly created message structure.
/// HIPAR type/Message type byte.
/// HIPAR systemState/System state byte.
/// HIPAR commandCode/Command code byte.
/// HIPAR dataBytesPtr/Pointer to data bytes, or NULL if none.
/// HIPAR numDataBytes/Number of data bytes byte, or 0 if none.
MessageStruct CreateMessage (uint8_t type, uint8_t systemState,
                             uint8_t commandCode,
                             void *dataBytesPtr, uint8_t numDataBytes)
{
But this won't work:
/*****************************************************************************
* Using the old C style comment markers.
 *****************************************************************************/

/// HIFN This returns a BufferStruct with the buffer data being the series of bytes representing the complete message with header, dataBytes and checksum at the end.
/// HIRET Copy of the newly created buffer structure.
/// HIPAR msg/Message structure.
BufferStruct BuildBufferFromMessage (MessageStruct msg)
{

 

#TheMoreYouKnow

 

0 Kudos
Message 2 of 2
(1,162 Views)