| ioPAC RTU Controllers C/C++ Sample Code Programming Guide

- Main Page
- Modules
- Data Structures
- Files

Enumerations | Functions
SMS
Library » Cellular

## Enumerations
enum | SMS_ERR_CODE { SMS_ERR_OK = 0, SMS_ERR_OPEN, SMS_ERR_ERR, SMS_ERR_PIN, SMS_ERR_PDU, SMS_ERR_MODEM, SMS_ERR_LENGTH, SMS_ERR_SYSTEM_INFO, SMS_ERR_NOT_SUPPORT_PRODUCT, SMS_ERR_ISP, SMS_ERR_AMOUNT }

## Functions
SMS_ERR_CODE | MX_RTU_SMS_Send_GSM_7bits_Default_Alphabet (INT8 *phone, INT8 *pin, INT8 *msg, INT32 msgLength)
SMS_ERR_CODE | MX_RTU_SMS_Send_Ucs2 (INT8 *phone, INT8 *pin, INT8 *ucs2Msg, INT8 msgLength)

## Detailed Description

Sample Code:
sms_send.c

## Enumeration Type Documentation

enum SMS_ERR_CODE

Enumerator
SMS_ERR_OK | 0
SMS_ERR_OPEN | 1
SMS_ERR_ERR | 2
SMS_ERR_PIN | 3
SMS_ERR_PDU | 4
SMS_ERR_MODEM | 5
SMS_ERR_LENGTH | 6
SMS_ERR_SYSTEM_INFO | 7
SMS_ERR_NOT_SUPPORT_PRODUCT | 8
SMS_ERR_ISP | 9
SMS_ERR_AMOUNT | 10

## Function Documentation

SMS_ERR_CODE MX_RTU_SMS_Send_GSM_7bits_Default_Alphabet | ( | INT8 * | phone,
|  | INT8 * | pin,
|  | INT8 * | msg,
|  | INT32 | msgLength
| ) |  |

This function send a SMS(GSM 03.38) to the specific phone

Parameters

  [in] | phone | Phone number
  [in] | pin | SIM PIN
  [in] | msg | Your message in ASCII character set
  [in] | msgLength | The length of the msg in bytes

Returns
  Please refer to SMS_ERR_CODE . On success, SMS_ERR_OK is returned.

SMS_ERR_CODE MX_RTU_SMS_Send_Ucs2 | ( | INT8 * | phone,
|  | INT8 * | pin,
|  | INT8 * | ucs2Msg,
|  | INT8 | msgLength
| ) |  |

This function send a SMS(in UCS2 format) to the specific phone

Parameters

  [in] | phone | Phone number
  [in] | pin | SIM PIN
  [in] | ucs2Msg | Your message using UCS2 encoded
  [in] | msgLength | The length of the ucs2Msg in bytes

Returns
  Please refer to SMS_ERR_CODE . On success, SMS_ERR_OK is returned.