PMOPENDEVICE(3)
PM Programmer's Manual
PMOPENDEVICE(3)
NAME
pmOpenDevice - open a PM device

SYNOPSIS
int pmOpenDevice(char *type, int argc, char **argv, pmDevice **pmdp);

ARGUMENTS
char * type
IN
Device type
int argc
IN
Number of optional arguments
char ** argv
IN
Array of optional arguments
pmDevice ** pmdp
OUT
pmDevice object

IMPLEMENTATION LEVEL
BASE

DESCRIPTION
pmOpenDevice() opens a PM device specified by type and returns a pmDevice object.

NOTES
Only one process can open a device.
Device dependent arguments are optional.

Common arguments are:
-config filename Configuration file name: if device needs a configuration file
-firmware filename Firmware file name: if device needs a firmware file
-agent agentname Agent name: If type is PM_AGENT, this argument is required to specify an agent name. Currently only "pmaudp" which means the UDP communication agent is available as the agent name.
-trunk:trunk_num filename This option is only effective to network trunking of PM/Ethernet.Configuration file name: if device needs a configuration file. Trunk_num is set to trunk number(0,1,2...)

All option strings are valid only in pmOpenDevice().

INTERNAL
Internal function is:
int open_device(int argc, char **argv, pmDevice **pmdp);
New device object must be initialized using the INIT_DEVICE macro.

RETURN VALUES
PM_SUCCESS Success
ENODEV No such device
EINVAL Invalid arguments
EIO Error occurs during device initialization
ENOMEM Not enough memory


CREDIT
This document is a part of the SCore cluster system software developed at PC Cluster Consortium, Japan. Copyright (C) 2003 PC Cluster Consortium.