RTAI API 5.1
Loading...
Searching...
No Matches

Conversion between 6 characters strings and unsigned long identifiers. More...

Functions

 if (num >=MAX_NAM2NUM)
 Convert an unsigned long identifier back to its corresponding 6 characters string. More...
 

Variables

int c
 Convert a 6 characters string to an unsigned long. More...
 

Detailed Description

Conversion between 6 characters strings and unsigned long identifiers.

Convert a 6 characters string to un unsigned long, and vice versa, to be used as an dentifier for RTAI services, symmetrically available in user and kernel space, e.g. shared memory and LXRT and LXRT-INFORMED.

Author
Paolo Mantegazza
Note
Copyright © 1999-2013 Paolo Mantegazza mante.nosp@m.gazz.nosp@m.a@aer.nosp@m.o.po.nosp@m.limi..nosp@m.it

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Function Documentation

◆ if()

if ( num >=  MAX_NAM2NUM)

Convert an unsigned long identifier back to its corresponding 6 characters string.

Parameters
numis the unsigned long identifier whose alphanumeric name string has to be evaluated;
nameis a pointer to a 6 characters buffer where the identifier will be returned. Recall to dimension it at least to 7.

Variable Documentation

◆ c

int c
Initial value:
{
unsigned long retval = 0

Convert a 6 characters string to an unsigned long.

Converts a 6 characters string name containing an alpha numeric identifier to its corresponding unsigned long identifier.

Parameters
nameis the name to be converted.

Allowed characters are:

  • english letters (no difference between upper and lower case, the latter will always be translated to upper case);
  • decimal digits;
  • '_', '@', '.' and another character of your choice, the latter will always be treated as a $ and converted back as such by num2nam().
Returns
the unsigned long associated with name.