File.
Returns the specified group name and the group’s channels names string associated with the specified group name index.
DioFileGroupGetName (hFile, nGroupNameIndex, pszGroupName, pnGroupNameLen, pnGroupChannelsNamesLen, pnNumOfChannelsNames, pnStatus)
Name |
Type |
Comments |
hFile |
SHORT |
Session identifier: File handle is used when communicating with a file. The File handle session identifier is returned by calling DioFileOpen. |
nGroupNameIndex |
SHORT |
Specified the group name index as it is stored in the file. The index is zero based. |
pszGroupName |
PSTR |
Buffer to contain the returned group’s channels name null terminated) string. |
pnGroupNameLen |
PSHORT |
Returns the actual size of the buffer to of group’s name string. |
pnGroupChannelsNamesLen |
PSHORT |
Returns the actual size of the buffer to of group’s channels names string. |
pnNumOfChannelsNames |
PSHORT |
Returns the number of channels in the group’s channels names string. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function returns the specified group name and the group’s channels names string associated with the specified group name index.
The function returns the specified group name string, and the length of the string of the group name. The user pass the buffers length of the pszGroupName using the pnGroupNameLen paramter, when the function returns, the pnGroupNameLen paramters returns the actual size of the buffer to of group name string. The function also returns the specified group’s channels names string, and the length of the string associated with the specified group’s name. The user pass the buffers length of the pszGroupChannelsNames using the pnGroupChannelsNamesLen paramters, when the function returns, the pnGroupChannelsNamesLen paramters rreturns the actual size of the buffer to of group’s channels names string.
The pszGroupChannelsNames uses semicolons between channles name in the string, e.g. the following group’s channels names string "RESET;CLK_IN;CLK_OUT;SOURCE;GND;" has 5 channels names.
See DioFileGroupGetChannelList() for complete example code.
The following example return the group name and channels names string at group name index 0 from the file:
SHORT hFile, nStatus;
SHORT nGroupNameLen, nGroupChannelsNamesLen;
CHAR szGroupName [512];
CHAR szGroupChannelsNames [512];
nGroupNameLen = sizeof (szGroupName);
nGroupChannelsNamesLen = sizeof (szGroupChannelsNames);
DioFileGroupGetName (hFile, 0, szGroupName, &nGroupNameLen, szGroupChannelsNames, &nGroupChannelsNamesLen, &nStatus);
DioFileOpen, DioFileClose, DioFileGroupDelete, DioFileGroupGet, DioFileGroupGetChannelList, DioFileGroupSet, DioGetErrorString