Network Component  Version 7.11.0
MDK Middleware for IPv4 and IPv6 Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NetSNTP: SNTP Client

Events generated by the Network - SNTP Client functions. More...

Functions

__STATIC_INLINE void EvrNetSNTP_InitClient (uint8_t mode)
 Event on SNTP client initialize (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_GetSocketFailed (void)
 Event on SNTP failed to allocate UDP socket (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTime (uint8_t mode)
 Event on netSNTPc_GetTime (API) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimeInvalidParameter (void)
 Event on netSNTPc_GetTime invalid parameter (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimeWrongState (uint8_t state)
 Event on netSNTPc_GetTime wrong client state (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimeOpen (const uint8_t *ip4_addr)
 Event on netSNTPc_GetTime open broadcast receive (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimeClose (void)
 Event on netSNTPc_GetTime close broadcast receive (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimeServerUnknown (const uint8_t *ip4_addr)
 Event on netSNTPc_GetTime unknown server for unicast mode (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimexInvalidParameter (void)
 Event on netSNTPc_GetTimeX invalid parameter (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimexClientBusy (void)
 Event on netSNTPc_GetTimeX client busy (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimexServerNotValid (void)
 Event on netSNTPc_GetTimeX server name not valid (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_GetTimexDnsError (void)
 Event on netSNTPc_GetTimeX host name resolver error (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_SetMode (uint8_t mode)
 Event on netSNTPc_SetMode (API) More...
 
__STATIC_INLINE void EvrNetSNTP_SetModeInvalidParameter (void)
 Event on netSNTPc_SetMode invalid parameter (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_SetModeWrongState (uint8_t state)
 Event on netSNTPc_SetMode wrong client state (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_SendMessage (const uint8_t *ip4_addr)
 Event on SNTP send message to NTP server (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_ServerNotResponding (const uint8_t *ip4_addr)
 Event on SNTP send message timeout (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_ReceiveFrame (const uint8_t *ip4_addr, uint32_t length)
 Event on SNTP receive frame (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_WrongServerPort (uint16_t udp_port)
 Event on SNTP wrong server port (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_FrameTooShort (uint32_t length, uint32_t min_length)
 Event on SNTP receive frame is too short (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_WrongServerAddress (const uint8_t *ip4_addr)
 Event on SNTP wrong NTP server address (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_ModeNotServer (uint8_t mode)
 Event on SNTP message mode not server (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_ModeNotBroadcast (uint8_t mode)
 Event on SNTP message mode not broadcast (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_AnswerInWrongState (uint8_t state)
 Event on SNTP answer received in wrong state (Error) More...
 
__STATIC_INLINE void EvrNetSNTP_ShowTimeStamp (uint32_t ref_time, uint32_t utc_time)
 Event on SNTP display time stamp in seconds (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_TimeStampInvalid (uint32_t ref_time)
 Event on SNTP invalid time stamp (Op) More...
 
__STATIC_INLINE void EvrNetSNTP_UninitClient (void)
 Event on SNTP client de-initialize (Op) More...
 

Description

Events generated by the Network - SNTP Client functions.

Function Documentation

__STATIC_INLINE void EvrNetSNTP_AnswerInWrongState ( uint8_t  state)

Event on SNTP answer received in wrong state (Error)

Parameters
stateclient state
  • 0: idle
  • 1: busy in unicast send
  • 2: open in broadcast receive
__STATIC_INLINE void EvrNetSNTP_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on SNTP receive frame is too short (Error)

Parameters
lengthframe length in bytes
min_lengthminimum length of the frame
__STATIC_INLINE void EvrNetSNTP_GetSocketFailed ( void  )

Event on SNTP failed to allocate UDP socket (Error)

__STATIC_INLINE void EvrNetSNTP_GetTime ( uint8_t  mode)

Event on netSNTPc_GetTime (API)

Parameters
modeoperation mode of the client
  • 0: unicast
  • 1: broadcast
__STATIC_INLINE void EvrNetSNTP_GetTimeClose ( void  )

Event on netSNTPc_GetTime close broadcast receive (Op)

__STATIC_INLINE void EvrNetSNTP_GetTimeInvalidParameter ( void  )

Event on netSNTPc_GetTime invalid parameter (Error)

__STATIC_INLINE void EvrNetSNTP_GetTimeOpen ( const uint8_t *  ip4_addr)

Event on netSNTPc_GetTime open broadcast receive (Op)

Parameters
ip4_addrpointer to IPv4 address of NTP server
__STATIC_INLINE void EvrNetSNTP_GetTimeServerUnknown ( const uint8_t *  ip4_addr)

Event on netSNTPc_GetTime unknown server for unicast mode (Error)

Parameters
ip4_addrpointer to IPv4 address of NTP server
__STATIC_INLINE void EvrNetSNTP_GetTimeWrongState ( uint8_t  state)

Event on netSNTPc_GetTime wrong client state (Error)

Parameters
stateclient state
  • 0: idle
  • 1: busy in unicast send
  • 2: open in broadcast receive
__STATIC_INLINE void EvrNetSNTP_GetTimexClientBusy ( void  )

Event on netSNTPc_GetTimeX client busy (Error)

__STATIC_INLINE void EvrNetSNTP_GetTimexDnsError ( void  )

Event on netSNTPc_GetTimeX host name resolver error (Error)

__STATIC_INLINE void EvrNetSNTP_GetTimexInvalidParameter ( void  )

Event on netSNTPc_GetTimeX invalid parameter (Error)

__STATIC_INLINE void EvrNetSNTP_GetTimexServerNotValid ( void  )

Event on netSNTPc_GetTimeX server name not valid (Error)

__STATIC_INLINE void EvrNetSNTP_InitClient ( uint8_t  mode)

Event on SNTP client initialize (Op)

Parameters
modeoperation mode of the client
  • 0: unicast
  • 1: broadcast
__STATIC_INLINE void EvrNetSNTP_ModeNotBroadcast ( uint8_t  mode)

Event on SNTP message mode not broadcast (Error)

Parameters
modemessage mode
  • 0: reserved
  • 1: symetric active
  • 2: symetric passive
  • 3: client
  • 4: server
  • 5: broadcast
  • 6: reserved
  • 7: reserved
__STATIC_INLINE void EvrNetSNTP_ModeNotServer ( uint8_t  mode)

Event on SNTP message mode not server (Error)

Parameters
modemessage mode
  • 0: reserved
  • 1: symetric active
  • 2: symetric passive
  • 3: client
  • 4: server
  • 5: broadcast
  • 6: reserved
  • 7: reserved
__STATIC_INLINE void EvrNetSNTP_ReceiveFrame ( const uint8_t *  ip4_addr,
uint32_t  length 
)

Event on SNTP receive frame (Op)

Parameters
ip4_addrpointer to IPv4 address of the server
lengthframe length in bytes
__STATIC_INLINE void EvrNetSNTP_SendMessage ( const uint8_t *  ip4_addr)

Event on SNTP send message to NTP server (Op)

Parameters
ip4_addrpointer to IPv4 address of NTP server
__STATIC_INLINE void EvrNetSNTP_ServerNotResponding ( const uint8_t *  ip4_addr)

Event on SNTP send message timeout (Op)

Parameters
ip4_addrpointer to IPv4 address of NTP server
__STATIC_INLINE void EvrNetSNTP_SetMode ( uint8_t  mode)

Event on netSNTPc_SetMode (API)

Parameters
modeoperation mode of the client
  • 0: unicast
  • 1: broadcast
__STATIC_INLINE void EvrNetSNTP_SetModeInvalidParameter ( void  )

Event on netSNTPc_SetMode invalid parameter (Error)

__STATIC_INLINE void EvrNetSNTP_SetModeWrongState ( uint8_t  state)

Event on netSNTPc_SetMode wrong client state (Error)

Parameters
stateclient state
  • 0: idle
  • 1: busy in unicast send
  • 2: open in broadcast receive
__STATIC_INLINE void EvrNetSNTP_ShowTimeStamp ( uint32_t  ref_time,
uint32_t  utc_time 
)

Event on SNTP display time stamp in seconds (Op)

Parameters
ref_timereference time (since Jan 1, 1900)
utc_timeutc time (since Jan 1, 1970)
__STATIC_INLINE void EvrNetSNTP_TimeStampInvalid ( uint32_t  ref_time)

Event on SNTP invalid time stamp (Op)

Parameters
ref_timereference time (since Jan 1, 1900)
__STATIC_INLINE void EvrNetSNTP_UninitClient ( void  )

Event on SNTP client de-initialize (Op)

__STATIC_INLINE void EvrNetSNTP_WrongServerAddress ( const uint8_t *  ip4_addr)

Event on SNTP wrong NTP server address (Error)

Parameters
ip4_addrpointer to IPv4 address of NTP server
__STATIC_INLINE void EvrNetSNTP_WrongServerPort ( uint16_t  udp_port)

Event on SNTP wrong server port (Error)

Parameters
udp_portwrong UDP port number