blob: 977cc94a7f2f949032325598945c591ed85026bc [file] [log] [blame]
Wolfgang Denk4646d2a2006-05-30 15:56:48 +02001/**
2 * @file IxNpeMhSend_p.h
3 *
4 * @author Intel Corporation
5 * @date 18 Jan 2002
6 *
7 * @brief This file contains the private API for the Send module.
8 *
9 *
10 * @par
11 * IXP400 SW Release version 2.0
12 *
13 * -- Copyright Notice --
14 *
15 * @par
16 * Copyright 2001-2005, Intel Corporation.
17 * All rights reserved.
18 *
19 * @par
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
22 * are met:
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 * 3. Neither the name of the Intel Corporation nor the names of its contributors
29 * may be used to endorse or promote products derived from this software
30 * without specific prior written permission.
31 *
32 * @par
33 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
34 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 * @par
46 * -- End of Copyright Notice --
47*/
48
49/**
50 * @defgroup IxNpeMhSend_p IxNpeMhSend_p
51 *
52 * @brief The private API for the Send module.
53 *
54 * @{
55 */
56
57#ifndef IXNPEMHSEND_P_H
58#define IXNPEMHSEND_P_H
59
60#include "IxNpeMh.h"
61#include "IxOsalTypes.h"
62
63/*
64 * #defines for function return types, etc.
65 */
66
67/*
68 * Prototypes for interface functions.
69 */
70
71/**
72 * @fn IX_STATUS ixNpeMhSendMessageSend (
73 IxNpeMhNpeId npeId,
74 IxNpeMhMessage message,
75 UINT32 maxSendRetries)
76 *
77 * @brief This function writes a message to the specified NPE's inFIFO,
78 * and must be used when the message being sent does not solicit a response
79 * from the NPE. This function will return TIMEOUT status if NPE hang / halt.
80 *
81 * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to send the message
82 * to.
83 * @param IxNpeMhMessage message (in) - The message to send.
84 * @param UINT32 maxSendRetries (in) - Max num. of retries to perform
85 * if the NPE's inFIFO is full.
86 *
87 * @return The function returns a status indicating success, failure or timeout.
88 */
89
90IX_STATUS ixNpeMhSendMessageSend (
91 IxNpeMhNpeId npeId,
92 IxNpeMhMessage message,
93 UINT32 maxSendRetries);
94
95/**
96 * @fn IX_STATUS ixNpeMhSendMessageWithResponseSend (
97 IxNpeMhNpeId npeId,
98 IxNpeMhMessage message,
99 IxNpeMhMessageId solicitedMessageId,
100 IxNpeMhCallback solicitedCallback,
101 UINT32 maxSendRetries)
102 *
103 * @brief This function writes a message to the specified NPE's inFIFO,
104 * and must be used when the message being sent solicits a response from
105 * the NPE. The ID of the solicited response must be specified so that it
106 * can be recognised, and a callback provided to pass the response back to
107 * the client. This function will return TIMEOUT status if NPE hang / halt.
108 *
109 * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to send the message
110 * to.
111 * @param IxNpeMhMessage message (in) - The message to send.
112 * @param IxNpeMhMessageId solicitedMessageId (in) - The ID of the
113 * solicited response.
114 * @param IxNpeMhCallback solicitedCallback (in) - The callback to pass the
115 * solicited response back to the client.
116 * @param UINT32 maxSendRetries (in) - Max num. of retries to perform
117 * if the NPE's inFIFO is full.
118 *
119 * @return The function returns a status indicating success, failure or timeout.
120 */
121
122IX_STATUS ixNpeMhSendMessageWithResponseSend (
123 IxNpeMhNpeId npeId,
124 IxNpeMhMessage message,
125 IxNpeMhMessageId solicitedMessageId,
126 IxNpeMhCallback solicitedCallback,
127 UINT32 maxSendRetries);
128
129/**
130 * @fn void ixNpeMhSendShow (
131 IxNpeMhNpeId npeId)
132 *
133 * @brief This function will display the current state of the Send module.
134 *
135 * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to display state
136 * information for.
137 *
138 * @return No return value.
139 */
140
141void ixNpeMhSendShow (
142 IxNpeMhNpeId npeId);
143
144/**
145 * @fn void ixNpeMhSendShowReset (
146 IxNpeMhNpeId npeId)
147 *
148 * @brief This function will reset the current state of the Send module.
149 *
150 * @param IxNpeMhNpeId npeId (in) - The ID of the NPE to reset state
151 * information for.
152 *
153 * @return No return value.
154 */
155
156void ixNpeMhSendShowReset (
157 IxNpeMhNpeId npeId);
158
159#endif /* IXNPEMHSEND_P_H */
160
161/**
162 * @} defgroup IxNpeMhSend_p
163 */