]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - qnx/src/ipc3x_dev/ti/syslink/rpmsg-rpc/rpmsg-rpc.h
Fixed 'make install' goal of ipc-qnx.mak for Windows to find recurse.mk
[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / rpmsg-rpc / rpmsg-rpc.h
1 /**
2  *  @file   rpmsg-omxdrv.h
3  *
4  *  @brief      Definitions of rpmsg-omxdrv internal types and structures.
5  *
6  *
7  *  @ver        02.00.00.46_alpha1
8  *
9  *  ============================================================================
10  *
11  *  Copyright (c) 2011-2012, Texas Instruments Incorporated
12  *
13  *  Redistribution and use in source and binary forms, with or without
14  *  modification, are permitted provided that the following conditions
15  *  are met:
16  *
17  *  *  Redistributions of source code must retain the above copyright
18  *     notice, this list of conditions and the following disclaimer.
19  *
20  *  *  Redistributions in binary form must reproduce the above copyright
21  *     notice, this list of conditions and the following disclaimer in the
22  *     documentation and/or other materials provided with the distribution.
23  *
24  *  *  Neither the name of Texas Instruments Incorporated nor the names of
25  *     its contributors may be used to endorse or promote products derived
26  *     from this software without specific prior written permission.
27  *
28  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
30  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
32  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
33  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
35  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
36  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
37  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
38  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  *  Contact information for paper mail:
40  *  Texas Instruments
41  *  Post Office Box 655303
42  *  Dallas, Texas 75265
43  *  Contact information:
44  *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
45  *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
46  *  ============================================================================
47  *
48  */
51 #ifndef RPMSGRPC_DRV_H_0xf2ba
52 #define RPMSGRPC_DRV_H_0xf2ba
55 #if defined (__cplusplus)
56 extern "C" {
57 #endif
60 /* =============================================================================
61  *  Macros and types
62  * =============================================================================
63  */
65 /** The applicable types of messages that the HOST may send the SERVICE.
66  */
67 enum rppc_msg_type {
68     /** Ask Service for channel information, uses \ref OmapRpc_ChannelInfo */
69     RPPC_MSG_QUERY_CHAN_INFO = 0,
70     /** The return message from OMAPRPC_MSG_QUERY_CHAN_INFO*/
71     RPPC_MSG_CHAN_INFO = 1,
72     /** Ask the Service Instance to send information about the Service.
73      * Uses \ref OmapRpc_QueryFunction */
74     RPPC_MSG_QUERY_FUNCTION = 2,
75     /** The return message from OMAPRPC_QUERY_INSTANCE,
76      * which contains the information about the instance.
77      * Uses \ref OmapRpc_Instance_Info */
78     RPPC_MSG_FUNCTION_INFO = 3,
79     /** Ask the ServiceMgr to create a new instance of the service.
80      * No secondary data is needed. */
81     RPPC_MSG_CREATE_INSTANCE = 6,
82     /** The return message from OMAPRPC_CREATE_INSTANCE,
83      * contains the new endpoint address in the OmapRpc_InstanceHandle */
84     RPPC_MSG_INSTANCE_CREATED = 8,
85     /** Ask the Service Mgr to destroy an instance */
86     RPPC_MSG_DESTROY_INSTANCE = 4,
87     /** The return message from OMAPRPC_DESTROY_INSTANCE.
88      * contains the old endpoint address in the OmapRpc_InstanceHandle */
89     RPPC_MSG_INSTANCE_DESTROYED = 7,
90     /** Ask the Service Instance to call a particular function */
91     RPPC_MSG_CALL_FUNCTION = 5,
92     /** The return values from a function call */
93     RPPC_MSG_FUNCTION_RETURN = 9,
94     /** Returned from either the ServiceMgr or Service Instance
95      * when an error occurs */
96     RPPC_MSG_ERROR = 10,
97     /** \hidden used to define the max msg enum, not an actual message */
98     RPPC_MSG_MAX
99 };
101 struct rppc_msg_header {
102     uint32_t  msg_type;    /**< @see rppc_msg_type */
103     uint32_t  msg_len;     /**< The length of the message data in bytes */
104 };
106 struct rppc_instance_handle {
107     uint32_t endpoint_address;
108     uint32_t status;
109 };
111 struct rppc_channel_info {
112     UInt32 num_funcs;      /**< The number of functions supported on this endpoint */
113 };
115 /*!
116  *  @brief  Max number of user processes supported
117  */
118 #define  MAX_PROCESSES          256u
120 /*!
121  *  @brief  Max number of connections supported
122  */
123 #define  MAX_CONNS              64
125 /*!
126  *  @brief  Number of event entries to cache
127  */
128 #define  CACHE_NUM              10
130 /*!
131  *  @brief  Structure that defines the MsgList elem
132  */
133 typedef struct MsgList {
134     int index;
135     int num_events;
136     struct MsgList *next;
137     struct MsgList *prev;
138 } MsgList_t;
140 /*!
141  *  @brief  Structure that defines the Waiting Readers list element
142  */
143 typedef struct WaitingReaders {
144     int rcvid;
145     struct WaitingReaders *next;
146 } WaitingReaders_t;
149 #if defined (__cplusplus)
151 #endif /* defined (__cplusplus) */
154 #endif /* RPMSGRPC_DRV_H_0xf2ba */