⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 am_sendmessage.c

📁 Motorola synergy audio component
💻 C
字号:
#ifdef __cplusplusextern "C" {#endif/*==================================================================================================                                                                                   Module Name:  AM_SendMessage.c    General Description: Utility function sends message and sets event mask for Audio Manager.====================================================================================================                               Motorola Confidential Proprietary                           Advanced Technology and Software Operations                        (c) Copyright Motorola 1999, All Rights Reserved  Revision History:                            Modification     TrackingAuthor                          Date          Number     Description of Changes-------------------------   ------------    ----------   -------------------------------------------Steve Hagino                08/03/2000      CSGce67731   Make Audio Manager Ansi-CompliantBill Choi                   12/05/1999      CSGce39558   Initial creation of filePortability: No.  This file is used exclusively within Audio Manager.====================================================================================================                                        INCLUDE FILES==================================================================================================*/#include <audio/am_server_task.h>#include <SUAPI/suapi.h>#include <ENGINE_AUDIO/aud_prim_ids.h>/*==================================================================================================                                 LOCAL FUNCTION PROTOTYPES==================================================================================================*//*==================================================================================================                                     LOCAL CONSTANTS==================================================================================================*//*==================================================================================================                          LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)==================================================================================================*//*==================================================================================================                                        LOCAL MACROS==================================================================================================*//*==================================================================================================                                      LOCAL VARIABLES==================================================================================================*//*==================================================================================================                                     GLOBAL VARIABLES==================================================================================================*/extern SU_EVMASK am_server_msg_event_mask;SU_PORT_HANDLE  am_data_logger_port;/*==================================================================================================                                     LOCAL FUNCTIONS==================================================================================================*//*==================================================================================================                                       GLOBAL FUNCTIONS==================================================================================================*//*==================================================================================================FUNCTION: AM_SendMessage          DESCRIPTION:   This function sends a message to the Audio Manager and sets the event mask.ARGUMENTS PASSED:   msgptr - A pointer to the location of the message being sent.    RETURN VALUE:   NonePRE-CONDITIONS:   None POST-CONDITIONS:   NoneIMPORTANT NOTES:   None==================================================================================================*/void AM_SendMessage( char * msgptr ){     suSendMessage(msgptr, am_server_task_port, NULL);   /*   suSetEventMask(am_server_task_handle, am_server_msg_event_mask, NULL); */}/*==================================================================================================FUNCTION: am_send_log_data DESCRIPTION:   This function will send log data (with a message type) to the datalogger for logging.ARGUMENTS PASSED:   UINT32 log_id:  This is the message ID. See /vobs/engine_audio/code/ghdr/aud_prim_ids.h   char * data:  This is the pointer to your data to send.    UINT32 length:  This is the length of your data to send.    RETURN VALUE:   NonePRE-CONDITIONS:POST-CONDITIONS:   Data is logged if the Datalogger PC has enabled the p/AUD/LOGR port.   IMPORTANT NOTES:   If you sending a struct, you should define it like this, according to a document called "P2k   Datalogging Instructions For Developers" by Dave Krause, Don Dorsey, Claudete Kawaata.   Data will not be sent to Datalogger PC unless the Datalogger PC has enabled    the p/AUD/LOGR port.==================================================================================================*/void am_send_log_data (UINT32 log_id, char *data, UINT32 length){    static SU_PORT_HANDLE am_data_logger_port = SU_INVALID_HANDLE;    static UINT8 logger_port_created = FALSE;    if (logger_port_created == FALSE)    {          /* Create a logger port */          am_data_logger_port = suCreateLoggerPort (NULL);          suRegisterPortName ("p/AUD/LOGR", am_data_logger_port, NULL);          logger_port_created=TRUE;    }         suLogData (am_data_logger_port, log_id, 1, length, (UINT8 *)data);    return;}/*================================================================================================*/#ifdef __cplusplus}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -