Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

16.4.1 Action Execution API

This section explains the action execution APIs.

A list of the Action Execution APIs is shown below:

16.4.1.1 Sound Notification API

This section explains the sound notification API (Mp_PlaySound2).

Synopsis

long Mp_PlaySound2 (unsigned char *AppName,
            int kind,
            unsigned char *text_or_filename,
            int repeat,
            MpSoundParam *SoundParam, 
            char *ExeHost)

Description

The following types of sound are notified:

Parameters

AppName

Specify the address of the application that made the call. The application name must be 64 bytes or less in length.

kind

Specify the type of sound. Specify one of the followings in this parameter.

SOUND_VOICE:

Reads out the message text.

SOUND_WAVE:

Plays a WAV file.

SOUND_BEEP:

Emits a beep.

text_or_filename

Specify one of the following depending on the value of parameter kind.

When specifying SOUND_VOICE:

Specify the address of the message text that is to be read out.

When specifying SOUND_WAVE

Specify the full path address of the file to be played to a value with up to 260 bytes. The file you specify must exist on the host specified by ExeHost.

When specifying SOUND_BEEP

This is invalid.

repeat

Specify the number of times the sound should be emitted. If 0 (zero) has been specified, repeats until stop processing has been completed.

SoundParam

Specify the address of the sound option information structure (MpSoundParam). If SOUND_VOICE has been specified, specify this when changing the system settings. This is invalid if SOUND_VOICE has not been specified. Specify NULL if this does not have to be set. If 0 (zero) has been specified for all items, the system settings will be used.

ExeHost

Specify the address of the name of host (client that chose execution of action) that executes actions. If NULL is specified, the action will be executed on the host you specified in the Action Environment Setup window.

Return Values

If the request was successfully accepted, an integer 0 or above will be returned. Any value less than 0 will be an error.

The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTSOUND

The environment for playing sound has not been installed.

Check that a product equipped with a voice synthesizing engine compatible with Microsoft Speech API(SAPI)5.x has been installed.

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Format of the Sound Option Information Structure (MpSoundParam)

typedef struct MpSoundParam_tag {
    DWORD dwVoiceType ;    // voice type
    DWORD dwIntonation ;   // voice intonation level
    DWORD dwPitch ;        // voice pitch
    DWORD dwSpeed ;        // voice speed
    DWORD dwSpeedRate  ;   // fluctuation of voice speed
    DWORD dwTone ;         // emphasis in voice tone
    DWORD dwVolume ;       // voice volume
} MpSoundParam ;

dwVoiceType

Specify the voice type.

VOICE_MALE:

This plays a male voice.

VOICE_FEMALE:

This plays a female voice.

dwIntonation

Specify an intonation level between 1 and 4.

dwPitch

Specify the pitch of the voice between 1 and 5.

dwSpeed

Specify the speed of the voice between 1 and 10.

dwSpeedRate

Specify the fluctuation of the speed of the voice between 1 and 10.

dwTone

Specify whether there is emphasis in high voice tone.

No:

1

Yes:

2

DWORD dwVolume

Specify the volume of the voice between 1 and 10.

Program Example

Below is an example program of the sound notification API:

#include "f3crhxac.h"

unsigned char *AppName = "Sound notification API" ;  // requested source application name
int kind               = SOUND_VOICE ;               // read out text
unsigned char *text    = "an error has occurred. please contact your operator." ;
int repeat             = 0 ;                         // repeat until stop process is executed.
MpSoundParam  *SndPrm  = NULL ;                      // default value is used.
long           lrc ;

/* request for sound notification */
lrc = Mp_PlaySound2(AppName,kind,text,repeat,NULL,NULL) ;
if ( lrc < 0 ) {
    /* error processing */
}

/* normal completion */

16.4.1.2 Stop Sound API

This section explains the stop sound API (Mp_StopSound).

Synopsis

long Mp_StopSound (unsigned char *AppName,
            long handle)

Description

This API stops the sound notification.

Parameters

AppName

Specify the address of the caller application specified in the sound stop API (Mp_PlaySound).

handle

Specify the value returned by the Mp_PlaySound function. If 0 (zero) has been specified, The sound that is currently being played will be stopped.

Return Values

If the request was successfully accepted, 0 will be returned. Any value less than 0 is an error. The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTACTION

Specified action does not exist (already finished).

-

MPACT_NOTSTOP

Cannot stop the specified action.

-

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Program Example

Below is an example program of the stop sound API:

#include "f3crhxac.h"

unsigned char *AppName = "Sound notification API" ;  // application name specified in the Mp_PlaySound()
long handle            = 1 ;                         // return value of Mp_PlaySound()
long lrc ;

lrc = Mp_StopSound(AppName,handle) ;
if ( lrc != 0 ) {
    /* error processing */
}

/* normal completion */

16.4.1.3 Pop-up Message Transmission (Specified Users) API

This section explains the pop-up message transmission (specified users) API (Mp_PopupUser2).

Synopsis

long Mp_PopupUser2 (unsigned char *AppName,
           MpAddress *AddressList,
           int nAddressList,
           unsigned char *MsgText, 
           char *ExeHost)

Description

This API displays messages on specified computers or on computers to which specified users have logged on.

Parameters

AppName

Specify the address of the application that made the call. The application name must be 64 bytes or less in length.

AddressList

Specify the address of the destination information structure (MpAddress). Specify the name of the user or computer that is sending the pop-up message. If there are multiple names, specify them in an array. If NULL is specified, the pop-up message will be sent to all users logged on to the domain.

nAddressList

Specify the number of arrays that were specified in AddressList.

MsgText

Specify the address of the message that will appear in the pop-up window. The message has to be within 128 bytes in length.

ExeHost

Specify the address of the name of host (client that chose execution of action) that executes actions. If NULL is specified, the action will be executed on the host you specified in the Action Environment Setup window.

Return Values

If the request was successfully accepted, 0 or a higher integer will be returned. Any value less than 0 is an error. The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTADDRESS

There is no valid user name or computer name.

There is an error in the address specified in the address information structure (MpAddress). Correct the address specification.

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Caution

Format of the Destination Information Structure (MpAddress)

typedef struct MpAddress_tag {  
    int type ; 
    unsigned char *address ; 
    char *addrid ; 
} MpAddress ;

type

Specify the type of address that was specified in address.

TYPE_ADDRESS:

This is the user name or computer name.

TYPE_NAME:

This is the destination name.

address

Specify the user name/computer name or the address of the destination.

addrid

This parameter is enabled when Systemwalker Centric Manager is installed and "TYPE_NAME" is specified as the type parameter. Refer to the Systemwalker Centric Manager Reference Guide for details.

Program Example

Below is an example program of the pop-up message transmission (specified users) API:

#include "f3crhxac.h"

unsigned char *AppName = "pop-up API" ;      // requested source application name
MpAddress addr[2] ;                              // destination address storage area
int naddr ;
unsigned char *text = "this will stop the system. " ;   // message text to be sent
long lrc ;

addr[0].type = TYPE_ADDRESS ;        // send a message to users "operator" and "user01"
addr[0].address = "operator" ;                                    
addr[1].type = TYPE_ADDRESS ;
addr[1].address = "user01" ;
naddr = 2 ;

lrc = Mp_PopupUser2(AppName,addr,naddr,text,NULL) ;
if ( lrc < 0 ) {
    /* error processing */
}

/* normal completion */

16.4.1.4 Pop-up Message Transmission (Domains) API

This section explains the pop-up message transmission (domain) API (Mp_PopupDomain2).

Synopsis

long Mp_PopupDomain2 (unsigned char *AppName,
            char *domain,
            unsigned char *MsgText,
            char *Exehost)

Description

This API displays pop-up messages on all computers that are connected to a specified domain.

Parameters

AppName

Specify the address of the application that made the call. The application name must be 64 bytes or less length.

domain

Specify the address of the domain that will display the message. The domain name has to be within 15 bytes in length.

MsgText

Specify the address of the message that will appear in the pop-up window. The message has to be within 128 bytes in length.

ExeHost

Specify the address of the name of host (client that chose execution of action) that executes actions. If NULL is specified, the action will be executed on the host you specified in the Action Environment Setup window.

Return Values

If the request was successfully accepted, 0 or a higher integer will be returned. Any value less than 0 is an error. The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Caution

Program Example

Below is an example program of the pop-up message transmission (domains) API:

#include "f3crhxac.h"

unsigned char *AppName = "pop-up API" ;  // requested source application name
char *domain = "Domain" ;                   // destination domain name
unsigned char *text = "this will stop the system. " ;   // message text to be sent
long lrc ;

lrc = Mp_PopupDomain2(AppName,domain,text,NULL) ;
if ( lrc < 0 ) {
    /* error processing */
}

/* normal completion */

16.4.1.5 Pop-up Message Transmission (All Users) API

This section explains the pop-up message transmission (all users) API (Mp_PopupSession2).

Synopsis

long Mp_PopupSession2 (unsigned char *AppName,
            unsigned char *MsgText,
            char *ExeHost)

Description

This API sends pop-up messages to all sessions connected to the server.

Parameters

AppName

Specify the address of the application that made the call. The application name must be 64 bytes or less in length.

MsgText

Specify the address of the message that will appear in the pop-up window. The message must be 128 bytes or less in length.

ExeHost

Specify the address of the name of host (client that chose execution of action) that executes actions. If NULL is specified, the action will be executed on the host you specified in the Action Environment Setup window.

Return Values

If the request was successfully accepted, 0 or a higher integer will be returned. Any value less than 0 is an error. The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Caution

Program Example

Below is an example program of the pop-up message transmission (all users) API:

#include "f3crhxac.h"

unsigned char *AppName = "pop-up API" ;             // requested source application name
unsigned char *text = "this will stop the system. " ;    // message text to be sent
long lrc ;

lrc = Mp_PopupSession2(AppName,text,NULL) ;
if ( lrc < 0 ) {
    /* error processing */
}

/* normal completion */

16.4.1.6 MS-Mail Transmission API

This section explains the MS-Mail transmission API (Mp_SendMSMail2).

Synopsis

long Mp_SendMSMail2 (unsigned char *AppName,
           MpAddress *AddressList,
           int nAddressList,
           MpDataList *MailData,
           int nMailData,
           unsigned char *MailTitle,
           MpMMParam *MmailParam,
           char *ExeHost)

Description

This API requests transmission of MS-Mail to the Action Control Server.

Parameters

AppName

Specify the address of the application that made the call. The application name must be 64 bytes or less in length.

AddressList

Specify the address of the destination information structure (MpAddress). Specify the name of the user that is sending the mail. If there are multiple names, specify them in an array.

nAddressList

Specify the number of arrays specified in AddressList.

MailData

Specify the address of the mail transmission data information structure (MpDataList). If you are sending multiple data sets, specify them in an array.

nMailData

Specify the number of arrays specified in MailData.

MailTitle

Specify the title of the mail.

MMailParam

Specify the address of the mail transmission control information structure (MpMMParam). Specify the information needed to send the mail. If NULL is specified, use each item's default value.

ExeHost

Specify the address of the name of host (client that chose execution of action) that executes actions. If NULL is specified, the action will be executed on the host you specified in the Action Environment Setup window.

Return Values

If the request was successfully accepted, 0 or a higher integer will be returned. Any value less than 0 is an error. The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTADDRESS

There is no valid mail address number.

There is an error in the address specified in the address information structure (MpAddress). Correct the address specification.

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Remarks

Caution

Since machines with Microsoft Outlook Express installed (e.g. Windows 2000) are unable to receive MS mails, use e-mails for reception.

Format of the Destination Information Structure (MpAddress)

typedef struct MpAddress_tag {  
    int type ;
    unsigned char *address ;
    char *addrid ;
} MpAddress ;  

type

Specify the type of address that was specified in address.

TYPE_ADDRESS:

This is the mail address of the MS-Mail destination.

TYPE_NAME:

This is the destination name.

address

Specify the mail address or destination address.

addrid

This parameter is enabled when Systemwalker Centric Manager is installed and "TYPE_NAME" is specified as the type parameter. Refer to the Systemwalker Centric Manager Reference Guide for details.

Format of the Mail Transmission Data Information Structure (MpDataList)

typedef struct MpDataList_tag {  
    int type ;
    unsigned char *data ;
} MpDataList ;  

type

Specify the type of data that will be specified in data.

TYPE_LMEMORY:

This is memory data.

TYPE_FILENAME:

This is a file name.

TYPE_TEMPFILE:

This is a file name. It will be deleted by the action control function after the mail has been sent successfully.

data

If TYPE_LMEMORY has been specified, specify the address of the memory data you specified using a maximum of 1,028 bytes.

If TYPE_FILENAME or TYPE_TEMPFILE has been specified, set the address of the file specified within MAX_PATH.

Format of the Mail Transmission Control Information Structure (MpMMParam)

typedef struct MpMMParam_tag {    
    char *Profile ;
    char *Password ;
} MpMMParam ;  

Profile

Specify the address of the user that is logging in. If NULL is specified, the default value is used.

Password

Specify the address of the password of the user who logs in. If NULL is specified, the default value is used.

Program Example

Below is an example program of the MS-Mail Transmission API

#include "f3crhxac.h"

unsigned char *AppName = "MS-Mail transmission API" ; // requested source application name
MpAddress addr[2] ;                                 // destination address storage area
int naddr ;
MpDataList data[2] ;
int ndata ;
unsigned char *Title   = "system abnormality notification" ;  // mail title
MpMMParam  MailPrm = NULL ;                                     // default value is used
long lrc ;

addr[0].type = TYPE_ADDRESS ;       // send a message to users "operator" and "user01" 
addr[0].address = "operator" ;                                     
addr[1].type = TYPE_ADDRESS ;
addr[1].address = "user01" ;
naddr = 2 ;

data[0].type = TYPE_LMEMORY ;      // setting for transmitting data
data[0].data = "abnormality has occurred. \r\n refer to the attached file for more detail. \r\n" ;
data[1].type = TYPE_FILENAME ;
data[1].data = "D:\\TEMP\\ERR001.LOG" ;
ndata = 2 ;

lrc = Mp_SendMSMail2(AppName,addr,naddr,data,ndata,Title,MailPrm,NULL) ;
if ( lrc < 0 ) {
    /* error processing */
}

/* normal completion */

16.4.1.7 E-Mail Transmission API

This section explains the e-mail transmission API (Mp_SendEMail).

Synopsis

long Mp_SendEMail (unsigned char *AppName,
           MpAddress *AddressList,
           int nAddressList, 
           MpDataList *MailData,
           int nMailData,
           char *FromAddress,
           unsigned char *MailTitle,
           char *SMTPServer)

Description

This API requests transmission of e-mail to the Action Control Server.

Parameters

AppName

Specify the address of the application that made the call. The application name must be 64 bytes or less in length.

AddressList

Specify the address of the destination information structure (MpAddress). If there are multiple names, specify them in an array.

See "16.4.1.6 MS-Mail Transmission API" for more information on the destination information structure.

nAddressList

Specify the number of addresses (arrays) specified in AddressList.

MailData

Specify the address of the mail transmission data information structure (MpDataList). If you are sending multiple data sets, specify them in an array.

See "16.4.1.6 MS-Mail Transmission API" for more information on the mail transmission data information structure.

nMailData

Specify the number of arrays specified in MailData.

FromAddress

Specify the mail address of the sender. If NULL is specified, the default value is used.

MailTitle

Specify the title of the mail.

SMTPServer

Specify the name of the SMTP server. If NULL is specified, the default value is used.

Return Values

If the request was successfully accepted, 0 or a higher integer will be returned. Any value less than 0 is an error. The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTADDRESS

There is no valid mail address number.

There is an error in the address specified in the address information structure (MpAddress). Correct the address specification.

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Remarks

Program Example

Below is an example program of the e-mail transmission API:

#include "f3crhxac.h"

unsigned char *AppName = "E-Mail transmission API" ;  // requested source application name
MpAddress addr[2] ;                                  // destination address storage area
int naddr ;
MpDataList data[2] ;
int ndata ;
char *FromAddr         = "MpWalker@fujitsu.co.jp" ;      // source address
unsigned char *Title   = "System Report" ;                      // mail title
char *SMTPSrv          = NULL ;                                  // default value is used
long lrc ;

addr[0].type = TYPE_ADDRESS ;   // send a message to user's "operator" and "user()1"
addr[0].address = "operator@fujitsu.co.jp" ;                   
addr[1].type = TYPE_ADDRESS ;
addr[1].address = "user01@fujitsu.co.jp" ;
naddr = 2 ;

data[0].type = TYPE_LMEMORY ;                 // setting for transmitting data
data[0].data = "abnormality has occurred.  \r\n refer to the attached file for more detail. \r\n" ;
data[1].type = TYPE_FILENAME ;
data[1].data = "D:\\TEMP\\ERR001.LOG" ;
ndata = 2 ;

lrc = Mp_SendEMail(AppName,addr,naddr,data,ndata,FromAddr,Title,SMTPSrv) ;
if ( lrc < 0 ) {
  /* error processing */
}

/* normal completion */

16.4.1.8 Short Mail Message Transmission API

This section explains the short mail message transmission API (Mp_CallPager2).

Synopsis

long Mp_CallPager2 (unsigned char *AppName,
          MpPagerList *AddressList,
          int nAddressList,
          char *MsgText,
          int msgtype,
          char *ExeHost)

Description

This API sends a short mail message.

Parameters

AppName

Specify the address of the application that made the call. The application name must be 64 bytes or less in length.

AddressList

Specify the address of the short mail transmission information structure (MpPagerList). Specify the telephone number of the short mail. If there are multiple telephone numbers, specify them in an array.

nAddressList

Specify the number of addresses (arrays) specified in AddressList.

MsgText

Specify the address of the short mail message to be sent. Specify the transmission code (including code of fixed type messages) of the message.

Or, specify the characters supported by the short mail company.

MsgType

Specify the format of the message that was specified in MsgText.

PAGER_CODE:

This is the number format.

PAGER_TEXT:

This is the message text.

exeHost

Specify the address of the name of host (client that chose execution of action) that executes actions. If NULL is specified, the action will be executed on the host you specified in the Action Environment Setup window.

Return Values

If the request was successfully accepted, 0 or a higher integer will be returned. Any value less than 0 is an error. The following table provides details about errors that may be returned.

Return Value

Meaning

Action

MPACT_PARAMERR

There is a parameter error.

Check for incorrect parameter settings.

MPACT_NOMEMORY

There is not enough memory.

Either increase the size of the page file or add more physical memory.

MPACT_NOTADDRESS

There is no valid mail address number.

There is an error in the address specified in the address information structure (MpAddress). Correct the address specification.

MPACT_NOTMODEM

A modem has not been installed.

Check that the modem is correctly installed and connected. Refer to the operating system help files for information on checking the status of a modem.

MPACT_NOTMOVE

The Action Control Server has not been started.

Check that Systemwalker MpAosfB is running.

MPACT_COMFAIL

An error has occurred in communication with the Action Control Server.

Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running.

MPACT_SYSERR

An error has occurred on the Action Control Server.

Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_NOTDLL

DLL for the action request cannot be loaded.

Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder:

Systemwalker installation directory\mpwalker\bin

If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE.

MPACT_EXCEPT

The address of an invalid area has been specified.

An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE.

Note: f3crhxac.dll" is replaced by "f3crhxac_64.dll" in 64-bit platforms.

Remarks

The maximum length of a message varies according to the type of short mail and the type of modem. Refer to the NTT DoCoMo mobile phone and modem instruction manuals for more information. If the message is longer than the maximum permissible length, the message may not be sent.

Format of the Short Mail Transmission Information Structure (MpPagerList)

typedef struct MpPagerList_tag {
    int type ;
    unsigned char *address ;
    char *addrid ;

    char *vender ;
} MpPagerList ;  

type

Specify the type of address that was specified in address.

TYPE_ADDRESS:

This is the telephone number of the short mail destination.

TYPE_NAME:

This is the destination name.

address

Specify the telephone number or address of the destination.

In the case of a telephone number, the telephone number of the short mail destination should be specified in the following format:

telephone number of short mail center + "T" + telephone number of notification destination

Telephone number of short mail center

Set the telephone number of the NTT DoCoMo Short Mail Center.

Reference: As of September 2007, the telephone number of the NTT DoCoMo Short Mail Center was 0903101655. Contact the contract company for more information.

T

A delimiting character. Set "T" or "t".

Telephone number of notification destination

Set the telephone number of the notification destination.

Example: To send a short mail message to a notification destination having the telephone number 09012345678:

0903101655T09012345678

addrid

This parameter is enabled when Systemwalker Centric Manager is installed and "TYPE_NAME" is specified as the type parameter. Refer to the Systemwalker Centric Manager Reference Guide for details.

vender

Set the short mail type. The short mail type supported by Systemwalker is provided below. To specify a different type, it will be necessary to specify the short mail company name registered using the Action Environment Setup window and create a message conversion exit (an exit used to convert unsupported short mail messages).

See "17.9 Unsupported Short Mail Message Conversion Exit [Windows]" for more about the exit for converting unsupported short mail messages.

MPPAGER_DOCOMO_SHORTMAIL:

NTT DoCoMo Short Mail

Program Example

Below is an example program of the short mail message transmission API:

#include "f3crhxac.h"

unsigned char *AppName = "short mail API" ;    // requested source application name
MpAddress addr[2] ;                               // destination address storage area
int naddr ;
char *text             = "an abnormality has occurred." ;   // message to be sent
int type               = PAGER_TEXT ;
long lrc ;


addr[0].type = TYPE_ADDRESS ;               // Sends Short Mail to 2 destinations
addr[0].address = "0903101655T1112223333" ;     
addr[0].vender = MPPAGER_DOCOMO_SHORTMAIL ;
addr[1].type = TYPE_ADDRESS ;
addr[1].address = "0903101655T1114445555" ;
addr[1].vender = MPPAGER_DOCOMO_SHORTMAIL ;
naddr = 2 ;

lrc = Mp_CallPager2(AppName,addr,naddr,text,type,NULL) ;
if ( lrc < 0 ) {
    /* error processing */
}

/* normal completion */