\doxysection{gsm\+\_\+03\+\_\+41.\+h}
\label{gsm__03__41_8h_source}\index{include/osmocom/gsm/protocol/gsm\_03\_41.h@{include/osmocom/gsm/protocol/gsm\_03\_41.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{4 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{5 }
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{7 }
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/core/endian.h>}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <osmocom/gsm/protocol/gsm\_04\_12.h>}}
\DoxyCodeLine{10 }
\DoxyCodeLine{11 \textcolor{preprocessor}{\#ifndef OSMO\_IS\_LITTLE\_ENDIAN}}
\DoxyCodeLine{12 \textcolor{preprocessor}{ \#define OSMO\_IS\_LITTLE\_ENDIAN 0}}
\DoxyCodeLine{13 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{preprocessor}{\#define GSM341\_MAX\_PAYLOAD      (GSM412\_MSG\_LEN-\/sizeof(struct gsm341\_ms\_message))}}
\DoxyCodeLine{16 \textcolor{preprocessor}{\#define GSM341\_MAX\_CHARS        (GSM341\_MAX\_PAYLOAD*8/7)}}
\DoxyCodeLine{17 \textcolor{preprocessor}{\#define GSM341\_7BIT\_PADDING     '\(\backslash\)r'}}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{comment}{/* Chapter 9.3.2 */}}
\DoxyCodeLine{20 \textcolor{keyword}{struct }gsm341\_ms\_message \{}
\DoxyCodeLine{21         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{22 \textcolor{preprocessor}{\#if OSMO\_IS\_LITTLE\_ENDIAN}}
\DoxyCodeLine{23                 uint8\_t code\_hi:6;}
\DoxyCodeLine{24                 uint8\_t gs:2;}
\DoxyCodeLine{25                 uint8\_t update:4;}
\DoxyCodeLine{26                 uint8\_t code\_lo:4;}
\DoxyCodeLine{27 \textcolor{preprocessor}{\#elif OSMO\_IS\_BIG\_ENDIAN}}
\DoxyCodeLine{28 \textcolor{comment}{/* auto-\/generated from the little endian part above (libosmocore/contrib/struct\_endianness.py) */}}
\DoxyCodeLine{29                 uint8\_t gs:2, code\_hi:6;}
\DoxyCodeLine{30                 uint8\_t code\_lo:4, update:4;}
\DoxyCodeLine{31 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{32         \} serial;}
\DoxyCodeLine{33         uint16\_t msg\_id;}
\DoxyCodeLine{34         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{35 \textcolor{preprocessor}{\#if OSMO\_IS\_LITTLE\_ENDIAN}}
\DoxyCodeLine{36                 uint8\_t language:4;}
\DoxyCodeLine{37                 uint8\_t group:4;}
\DoxyCodeLine{38 \textcolor{preprocessor}{\#elif OSMO\_IS\_BIG\_ENDIAN}}
\DoxyCodeLine{39 \textcolor{comment}{/* auto-\/generated from the little endian part above (libosmocore/contrib/struct\_endianness.py) */}}
\DoxyCodeLine{40                 uint8\_t group:4, language:4;}
\DoxyCodeLine{41 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{42         \} dcs;}
\DoxyCodeLine{43         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{44 \textcolor{preprocessor}{\#if OSMO\_IS\_LITTLE\_ENDIAN}}
\DoxyCodeLine{45                 uint8\_t total:4;}
\DoxyCodeLine{46                 uint8\_t current:4;}
\DoxyCodeLine{47 \textcolor{preprocessor}{\#elif OSMO\_IS\_BIG\_ENDIAN}}
\DoxyCodeLine{48 \textcolor{comment}{/* auto-\/generated from the little endian part above (libosmocore/contrib/struct\_endianness.py) */}}
\DoxyCodeLine{49                 uint8\_t current:4, total:4;}
\DoxyCodeLine{50 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{51         \} page;}
\DoxyCodeLine{52         uint8\_t data[0];}
\DoxyCodeLine{53 \} \_\_attribute\_\_((packed));}
\DoxyCodeLine{54 }
\DoxyCodeLine{55 \textcolor{comment}{/* Chapter 9.4.1.3 */}}
\DoxyCodeLine{56 \textcolor{keyword}{struct }gsm341\_etws\_message \{}
\DoxyCodeLine{57         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{58 \textcolor{preprocessor}{\#if OSMO\_IS\_LITTLE\_ENDIAN}}
\DoxyCodeLine{59                 uint8\_t code\_hi:4;}
\DoxyCodeLine{60                 uint8\_t popup:1;}
\DoxyCodeLine{61                 uint8\_t alert:1;}
\DoxyCodeLine{62                 uint8\_t gs:2;}
\DoxyCodeLine{63                 uint8\_t update:4;}
\DoxyCodeLine{64                 uint8\_t code\_lo:4;}
\DoxyCodeLine{65 \textcolor{preprocessor}{\#elif OSMO\_IS\_BIG\_ENDIAN}}
\DoxyCodeLine{66 \textcolor{comment}{/* auto-\/generated from the little endian part above (libosmocore/contrib/struct\_endianness.py) */}}
\DoxyCodeLine{67                 uint8\_t gs:2, alert:1, popup:1, code\_hi:4;}
\DoxyCodeLine{68                 uint8\_t code\_lo:4, update:4;}
\DoxyCodeLine{69 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{70         \} serial;}
\DoxyCodeLine{71         uint16\_t msg\_id;}
\DoxyCodeLine{72         uint16\_t warning\_type;}
\DoxyCodeLine{73         uint8\_t data[0];}
\DoxyCodeLine{74 \} \_\_attribute\_\_((packed));}
\DoxyCodeLine{75 }
\DoxyCodeLine{76 \textcolor{preprocessor}{\#define GSM341\_MSG\_CODE(ms) ((ms)-\/>serial.code\_lo | ((ms)-\/>serial.code\_hi << 4))}}
\DoxyCodeLine{77 }
\DoxyCodeLine{78 \textcolor{comment}{/* Section 9.3.2.1 -\/ Geographical Scope */}}
\DoxyCodeLine{79 \textcolor{preprocessor}{\#define GSM341\_GS\_CELL\_WIDE\_IMMED       0}}
\DoxyCodeLine{80 \textcolor{preprocessor}{\#define GSM341\_GS\_PLMN\_WIDE             1}}
\DoxyCodeLine{81 \textcolor{preprocessor}{\#define GSM341\_GS\_LA\_WIDE               2}}
\DoxyCodeLine{82 \textcolor{preprocessor}{\#define GSM341\_GS\_CELL\_WIDE             3}}
\DoxyCodeLine{83 }
\DoxyCodeLine{84 \textcolor{comment}{/* Section 9.4.1.2.2 */}}
\DoxyCodeLine{85 \textcolor{preprocessor}{\#define GSM341\_MSGID\_EOTD\_ASSISTANCE                    0x03E8}}
\DoxyCodeLine{86 \textcolor{preprocessor}{\#define GSM341\_MSGID\_DGPS\_CORRECTION                    0x03E9}}
\DoxyCodeLine{87 \textcolor{preprocessor}{\#define GSM341\_MSGID\_DGPS\_EPH\_CLOCK\_COR                 0x03EA}}
\DoxyCodeLine{88 \textcolor{preprocessor}{\#define GSM341\_MSGID\_GPS\_ALMANAC\_OTHER                  0x03EB}}
\DoxyCodeLine{89 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_EARTHQUAKE                    0x1100}}
\DoxyCodeLine{90 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_TSUNAMI                       0x1101}}
\DoxyCodeLine{91 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_QUAKE\_AND\_TSUNAMI             0x1102}}
\DoxyCodeLine{92 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_TEST                          0x1103}}
\DoxyCodeLine{93 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_OTHER                         0x1104}}
\DoxyCodeLine{94 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_PRESIDENTIAL             0x1112}}
\DoxyCodeLine{95 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_IMM\_OBSERVED     0x1113}}
\DoxyCodeLine{96 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_IMM\_LIKELY       0x1114}}
\DoxyCodeLine{97 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_EXP\_OBSERVED     0x1115}}
\DoxyCodeLine{98 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_EXP\_LIKELY       0x1116}}
\DoxyCodeLine{99 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_IMM\_OBSERVED      0x1117}}
\DoxyCodeLine{100 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_IMM\_LIKELY        0x1118}}
\DoxyCodeLine{101 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_EXP\_OBSERVED      0x1119}}
\DoxyCodeLine{102 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_EXP\_LIKELY        0x111A}}
\DoxyCodeLine{103 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_AMBER                    0x111B}}
\DoxyCodeLine{104 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_MONTHLY\_TEST             0x111C}}
\DoxyCodeLine{105 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXERCISE                 0x111D}}
\DoxyCodeLine{106 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_OPERATOR\_DEFINED         0x111E}}
\DoxyCodeLine{107 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_PRESIDENTIAL\_AL          0x111F}}
\DoxyCodeLine{108 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_IMM\_OBSERVED\_AL  0x1120}}
\DoxyCodeLine{109 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_IMM\_LIKELY\_AL    0x1121}}
\DoxyCodeLine{110 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_EXP\_OBSERVED\_AL  0x1122}}
\DoxyCodeLine{111 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXTREME\_EXP\_LIKELY\_AL    0x1123}}
\DoxyCodeLine{112 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_IMM\_OBSERVED\_AL   0x1124}}
\DoxyCodeLine{113 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_IMM\_LIKELY\_AL     0x1125}}
\DoxyCodeLine{114 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_EXP\_OBSERVED\_AL   0x1126}}
\DoxyCodeLine{115 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_SEVERE\_EXP\_LIKELY\_AL     0x1127}}
\DoxyCodeLine{116 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_AMBER\_AL                 0x1128}}
\DoxyCodeLine{117 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_MONTHLY\_TEST\_AL          0x1129}}
\DoxyCodeLine{118 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_EXERCISE\_AL              0x112A}}
\DoxyCodeLine{119 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_CMAS\_OPERATOR\_DEFINED\_AL      0x112B}}
\DoxyCodeLine{120 \textcolor{preprocessor}{\#define GSM341\_MSGID\_ETWS\_EU\_INFO\_LOCAL\_LANGUAGE        0x1900}}

\end{DoxyCode}
