1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     cec_Const.h
4 
5   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 28934 $
14  *---------------------------------------------------------------------------*/
15 #ifndef NN_CEC_CTR_CEC_CONST_H_
16 #define NN_CEC_CTR_CEC_CONST_H_
17 
18 #include <nn/types.h>
19 
20 #define CEC_SIZEOF_SENDERID     (16)
21 #define CEC_SIZEOF_HASH         (32)
22 
23 #define MESSAGE_HMAC_KEYLEN        (32)
24 
25 #define MESSID_LEN_8
26 
27 namespace nn {
28 namespace cec {
29 namespace CTR {
30 
31   #ifdef MESSID_LEN_8
32     /*! @brief   MessageId のサイズ    */
33     static const s32 CEC_SIZEOF_MESSAGEID = (8);
34   #else
35     /*! @brief   MessageId のサイズ    */
36     static const s32 CEC_SIZEOF_MESSAGEID = (16);
37   #endif
38 
39     static const size_t MESSAGE_ID_SIZE             = CEC_SIZEOF_MESSAGEID;
40     static const size_t MESSAGE_HEADER_SIZE         = 128;
41     static const size_t MESSAGE_ICON_SIZE           = 3200;
42     static const size_t MODULE_FILTER_HEADER_SIZE   = 5;
43     static const size_t MODULE_FILTER_SIZE_MAX      = 0x10;
44 
45     /*! @brief   Message本文の最大サイズ    */
46     static const size_t MESSAGE_BODY_SIZE_MAX       = 96*1024;
47 
48     //! @name 送信回数・伝播回数
49     //@{
50     /*! @brief   送信回数の指定。一回だけ送信。    */
51     static const u8 MESSAGE_SENDCOUNT_ONCE             = (0x01);
52     /*! @brief   送信回数の指定。送信回数制限無し。   */
53     static const u8 MESSAGE_SENDCOUNT_UNLIMITED        = (0xFF);
54     /*! @brief   伝播回数の指定。伝播しない。    */
55     static const u8 MESSAGE_PROPAGATIONCOUNT_ONCE      = (0x01);
56     //MESSAGE_PROPAGATIONCOUNT_UNLIMITED  = (0xFF)         //!< 伝播回数制限無し
57     //@}
58 
59 } // namespace CTR
60 } // namespace cec
61 } // namespace nn
62 
63 
64 #endif  //NN_CEC_CTR_CEC_CONST_H_
65 
66