base/include/rtai_nam2num.h File Reference


Detailed Description

Conversion between characters strings and unsigned long identifiers.

Convert a 6 characters string to un unsigned long, and vice versa, to be used as an identifier 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-2003 Paolo Mantegazza <mantegazza@aero.polimi.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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file rtai_nam2num.h.#include <rtai_types.h>

Include dependency graph for rtai_nam2num.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

unsigned long nam2num (const char *name)
 Convert a 6 characters string to an unsigned long.
void num2nam (unsigned long num, char *name)
 Convert an unsigned long to a 6 characters string.


Function Documentation

unsigned long nam2num const char *  name  )  [inline, static]
 

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:
name is the name to be converted.
Allowed characters are:
  • english letters (no difference between upper and lower case);
  • decimal digits;
  • underscore (_) and another character of your choice. The latter will be always converted back to a $ by num2nam().

Returns:
the unsigned long associated with name.
Definition at line 53 of file rtai_nam2num.h.

Referenced by main(), pthread_mutex_open_rt(), RT_get_adr(), rt_Name_locate(), rt_named_bits_init(), rt_named_msgq_init(), rt_named_task_init(), rt_named_task_init_cpuid(), RT_typed_named_mbx_init(), rt_typed_named_mbx_init(), rt_typed_named_sem_init(), RT_typed_named_sem_init(), and sem_open_rt().

void num2nam unsigned long  num,
char *  name
[inline, static]
 

Convert an unsigned long to a 6 characters string.

Parameters:
num is the unsigned long identifier whose alphanumeric name string has to be evaluated;
name is a pointer to a 6 characters buffer where the identifier will be returned.
Definition at line 87 of file rtai_nam2num.h.

Referenced by __rtai_shm_exit(), krtai_objects_release(), linux_process_termination(), pthread_mutex_close_rt(), pthread_rwlock_close_rt(), and sem_close_rt().


Generated on Thu Nov 20 11:52:59 2008 for RTAI API by doxygen 1.3.8