summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Burnicki <martin.burnicki@meinberg.de>2022-07-01 12:00:00 +0200
committerMartin Burnicki <martin.burnicki@meinberg.de>2022-07-08 17:21:00 +0200
commit7a3420541be4aee137f14b23910dbf73f7eac7e0 (patch)
tree8520231c4388437a8981e27c111fd8a11f22600e
parent5ab4f758d5b7c61184b90a85d3f9a0bff84e0c3f (diff)
downloadmbgtools-win-7a3420541be4aee137f14b23910dbf73f7eac7e0.tar.gz
mbgtools-win-7a3420541be4aee137f14b23910dbf73f7eac7e0.zip
Update some mbglib files
-rw-r--r--mbglib/common/deviohlp.c68
-rw-r--r--mbglib/common/deviohlp.h10
-rw-r--r--mbglib/common/lan_util.c2
-rw-r--r--mbglib/common/mbgdevio.h14
-rw-r--r--mbglib/common/nanotime.c10
-rw-r--r--mbglib/common/nanotime.h10
-rw-r--r--mbglib/win32/mbgsvctl.h57
7 files changed, 119 insertions, 52 deletions
diff --git a/mbglib/common/deviohlp.c b/mbglib/common/deviohlp.c
index caa324d..7a09c70 100644
--- a/mbglib/common/deviohlp.c
+++ b/mbglib/common/deviohlp.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: deviohlp.c 1.9 2021/03/22 17:57:27Z martin REL_M $
+ * $Id: deviohlp.c 1.10 2022/06/30 09:09:59Z martin.burnicki REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -18,7 +18,9 @@
*
* -----------------------------------------------------------------------
* $Log: deviohlp.c $
- * Revision 1.9 2021/03/22 17:57:27Z martin
+ * Revision 1.10 2022/06/30 09:09:59Z martin.burnicki
+ * Prepare for variants of some functions, and some style cleanup.
+ * Revision 1.9 2021/03/22 17:57:27 martin
* Updated a bunch of comments.
* Revision 1.8 2020/02/27 13:37:09 martin
* Use some feature check functions instead of macros. This obsoletes
@@ -589,7 +591,7 @@ out:
return rc;
-} // mbg_get_all_net_cfg_info
+} // mbg_get_all_net_cfg_info
@@ -647,7 +649,7 @@ int mbg_save_all_net_cfg_info( MBG_DEV_HANDLE dh, ALL_NET_CFG_INFO *p )
return rc;
-} // mbg_save_all_net_cfg_info
+} // mbg_save_all_net_cfg_info
@@ -845,7 +847,7 @@ out:
return rc;
-} // mbg_get_all_net_status_info
+} // mbg_get_all_net_status_info
@@ -967,7 +969,7 @@ int mbg_save_all_ptp_cfg_info( MBG_DEV_HANDLE dh, const ALL_PTP_CFG_INFO *p )
* @note ::mbg_chk_dev_has_xmr should be called before using this function.
*
* An ::ALL_XMULTI_REF_INFO and a number of ::XMULTI_REF_INSTANCES::n_xmr_settings
- * of ::XMULTI_REF_INFO_IDX and ::XMR_EXT_SRC_INFO_IDX will be allocated and needs
+ * of ::XMULTI_REF_INFO_IDX and ::XMR_EXT_SRC_INFO_IDX will be allocated and need
* to be freed by calling ::free_all_xmulti_ref_info.
*
* @param[in] dh Valid handle to a Meinberg device.
@@ -980,11 +982,13 @@ int mbg_save_all_ptp_cfg_info( MBG_DEV_HANDLE dh, const ALL_PTP_CFG_INFO *p )
int mbg_get_all_xmulti_ref_info( MBG_DEV_HANDLE dh, ALL_XMULTI_REF_INFO **p )
{
ALL_XMULTI_REF_INFO *xmr_info = *p;
+ size_t data_sz;
int rc;
if ( xmr_info == NULL )
{
- xmr_info = ( ALL_XMULTI_REF_INFO * )calloc( 1, sizeof( *xmr_info ) );
+ xmr_info = (ALL_XMULTI_REF_INFO *) calloc( 1, sizeof( *xmr_info ) );
+
if ( xmr_info == NULL )
{
rc = MBG_ERR_NO_MEM;
@@ -998,9 +1002,13 @@ int mbg_get_all_xmulti_ref_info( MBG_DEV_HANDLE dh, ALL_XMULTI_REF_INFO **p )
if ( mbg_rc_is_error( rc ) )
goto out;
+
+ data_sz = xmr_info->instances.n_xmr_settings * sizeof( *xmr_info->infos );
+
if ( xmr_info->infos == NULL )
{
- xmr_info->infos = ( XMULTI_REF_INFO_IDX * )calloc( xmr_info->instances.n_xmr_settings, sizeof( *xmr_info->infos ) );
+ xmr_info->infos = (XMULTI_REF_INFO_IDX *) calloc( 1, data_sz );
+
if ( xmr_info->infos == NULL )
{
rc = MBG_ERR_NO_MEM;
@@ -1034,7 +1042,7 @@ out:
return rc;
-} // mbg_get_all_xmulti_ref_info
+} // mbg_get_all_xmulti_ref_info
@@ -1052,21 +1060,22 @@ out:
*
* @see ::mbg_set_gps_xmr_settings_idx
*/
-_NO_MBG_API_ATTR int _MBG_API mbg_save_all_xmulti_ref_info( MBG_DEV_HANDLE dh, ALL_XMULTI_REF_INFO *p )
+_NO_MBG_API_ATTR int _MBG_API mbg_save_all_xmulti_ref_info( MBG_DEV_HANDLE dh,
+ ALL_XMULTI_REF_INFO *p )
{
int rc = MBG_SUCCESS, i;
XMULTI_REF_SETTINGS_IDX settings;
- for (i = 0; ( i < p->instances.n_xmr_settings ) && mbg_rc_is_success( rc ); i++ )
+ for ( i = 0; ( i < p->instances.n_xmr_settings ) && mbg_rc_is_success( rc ); i++ )
{
settings.idx = i;
- memcpy( &settings.settings, &p->infos[i].info.settings, sizeof( settings.settings ) );
+ settings.settings = p->infos[i].info.settings;
rc = mbg_set_gps_xmr_settings_idx( dh, &settings );
}
// After all settings have been successully written, write
// a dummy structure with index -1 to apply settings.
- if( mbg_rc_is_success( rc ) )
+ if ( mbg_rc_is_success( rc ) )
{
memset( &settings, 0, sizeof( settings ) );
settings.idx = -1;
@@ -1076,7 +1085,7 @@ _NO_MBG_API_ATTR int _MBG_API mbg_save_all_xmulti_ref_info( MBG_DEV_HANDLE dh, A
return rc;
-} // mbg_save_all_xmulti_ref_info
+} // mbg_save_all_xmulti_ref_info
@@ -1087,7 +1096,7 @@ _NO_MBG_API_ATTR int _MBG_API mbg_save_all_xmulti_ref_info( MBG_DEV_HANDLE dh, A
* @note ::mbg_chk_dev_has_xmr should be called before using this function.
*
* An ::ALL_XMULTI_REF_STATUS and a number of ::XMULTI_REF_INSTANCES::n_xmr_settings
- * of ::XMULTI_REF_STATUS_IDX will be allocated and needs to be freed by calling
+ * of ::XMULTI_REF_STATUS_IDX will be allocated and need to be freed by calling
* ::free_all_xmulti_ref_status.
*
* @param[in] dh Valid handle to a Meinberg device.
@@ -1098,9 +1107,11 @@ _NO_MBG_API_ATTR int _MBG_API mbg_save_all_xmulti_ref_info( MBG_DEV_HANDLE dh, A
*
* @see ::free_all_xmulti_ref_status
*/
-int mbg_get_all_xmulti_ref_status( MBG_DEV_HANDLE dh, const ALL_XMULTI_REF_INFO *info, ALL_XMULTI_REF_STATUS **p )
+int mbg_get_all_xmulti_ref_status( MBG_DEV_HANDLE dh, const ALL_XMULTI_REF_INFO *info,
+ ALL_XMULTI_REF_STATUS **p )
{
ALL_XMULTI_REF_STATUS *xmr_status = *p;
+ size_t data_sz;
int rc;
if ( info == NULL )
@@ -1108,7 +1119,8 @@ int mbg_get_all_xmulti_ref_status( MBG_DEV_HANDLE dh, const ALL_XMULTI_REF_INFO
if ( xmr_status == NULL )
{
- xmr_status = ( ALL_XMULTI_REF_STATUS * )calloc( 1, sizeof( *xmr_status ) );
+ xmr_status = (ALL_XMULTI_REF_STATUS *) calloc( 1, sizeof( *xmr_status ) );
+
if ( xmr_status == NULL )
{
rc = MBG_ERR_NO_MEM;
@@ -1116,9 +1128,11 @@ int mbg_get_all_xmulti_ref_status( MBG_DEV_HANDLE dh, const ALL_XMULTI_REF_INFO
}
}
+ data_sz = info->instances.n_xmr_settings * sizeof( *xmr_status->status );
+
if ( xmr_status->status == NULL )
{
- xmr_status->status = ( XMULTI_REF_STATUS_IDX* )calloc( info->instances.n_xmr_settings, sizeof( *xmr_status->status ) );
+ xmr_status->status = (XMULTI_REF_STATUS_IDX *) calloc( 1, data_sz );
if ( xmr_status->status == NULL )
{
@@ -1132,11 +1146,15 @@ int mbg_get_all_xmulti_ref_status( MBG_DEV_HANDLE dh, const ALL_XMULTI_REF_INFO
if ( mbg_rc_is_error( rc ) )
goto out;
- if ( mbg_rc_is_success( chk_dev_xmulti_ref_supp_ext_src_info( info ) ) )
- {
- // TODO
- // XMR_EXT_SRC_INFO_IDX can not yet be read from bus level devices.
- }
+ #if 0
+ // TODO Some more detailed status info could be read here,
+ // if supported by bus level devices, using code similar to this:
+
+ if ( mbg_rc_is_success( chk_dev_xmulti_ref_supp_...() ) )
+ {
+ ...
+ }
+ #endif
out:
if ( mbg_rc_is_error( rc ) )
@@ -1149,7 +1167,7 @@ out:
return rc;
-} // mbg_get_all_xmulti_ref_status
+} // mbg_get_all_xmulti_ref_status
@@ -1240,7 +1258,7 @@ success_out:
return rc;
-} // mbg_get_all_ucap_info
+} // mbg_get_all_ucap_info
diff --git a/mbglib/common/deviohlp.h b/mbglib/common/deviohlp.h
index 04b8cce..e362a62 100644
--- a/mbglib/common/deviohlp.h
+++ b/mbglib/common/deviohlp.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: deviohlp.h 1.6 2021/03/21 18:08:14Z martin REL_M $
+ * $Id: deviohlp.h 1.7 2022/06/30 09:10:39Z martin.burnicki REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -10,7 +10,9 @@
*
* -----------------------------------------------------------------------
* $Log: deviohlp.h $
- * Revision 1.6 2021/03/21 18:08:14Z martin
+ * Revision 1.7 2022/06/30 09:10:39Z martin.burnicki
+ * Updated function prototypes due to some doxygen comment fixes.
+ * Revision 1.6 2021/03/21 18:08:14 martin
* Updated a bunch of comments.
* Revision 1.5 2020/02/27 13:40:00 martin
* Added some new inline functions.
@@ -402,7 +404,7 @@ int _DEPRECATED_BY( "pcps_date_time_wday_is_valid" ) pcps_time_is_valid( const P
* @note ::mbg_chk_dev_has_xmr should be called before using this function.
*
* An ::ALL_XMULTI_REF_INFO and a number of ::XMULTI_REF_INSTANCES::n_xmr_settings
- * of ::XMULTI_REF_INFO_IDX and ::XMR_EXT_SRC_INFO_IDX will be allocated and needs
+ * of ::XMULTI_REF_INFO_IDX and ::XMR_EXT_SRC_INFO_IDX will be allocated and need
* to be freed by calling ::free_all_xmulti_ref_info.
*
* @param[in] dh Valid handle to a Meinberg device.
@@ -435,7 +437,7 @@ int _DEPRECATED_BY( "pcps_date_time_wday_is_valid" ) pcps_time_is_valid( const P
* @note ::mbg_chk_dev_has_xmr should be called before using this function.
*
* An ::ALL_XMULTI_REF_STATUS and a number of ::XMULTI_REF_INSTANCES::n_xmr_settings
- * of ::XMULTI_REF_STATUS_IDX will be allocated and needs to be freed by calling
+ * of ::XMULTI_REF_STATUS_IDX will be allocated and need to be freed by calling
* ::free_all_xmulti_ref_status.
*
* @param[in] dh Valid handle to a Meinberg device.
diff --git a/mbglib/common/lan_util.c b/mbglib/common/lan_util.c
index b31951e..abdb2d8 100644
--- a/mbglib/common/lan_util.c
+++ b/mbglib/common/lan_util.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: lan_util.c 1.23 2021/07/20 10:27:30Z daniel TRASH $
+ * $Id: lan_util.c 1.23 2021/07/20 10:27:30Z daniel REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
diff --git a/mbglib/common/mbgdevio.h b/mbglib/common/mbgdevio.h
index f27e653..c7225f8 100644
--- a/mbglib/common/mbgdevio.h
+++ b/mbglib/common/mbgdevio.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgdevio.h 1.61 2022/04/27 15:04:20Z martin.burnicki REL_M $
+ * $Id: mbgdevio.h 1.62 2022/05/31 14:00:10Z martin.burnicki REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -10,7 +10,9 @@
*
* -----------------------------------------------------------------------
* $Log: mbgdevio.h $
- * Revision 1.61 2022/04/27 15:04:20Z martin.burnicki
+ * Revision 1.62 2022/05/31 14:00:10Z martin.burnicki
+ * Added non-automatic prototypes for SYN1588 mutex functions on Windows.
+ * Revision 1.61 2022/04/27 15:04:20 martin.burnicki
* New inline functions mbg_create_dev_name() and
* mbg_create_dev_name_from_dev_info().
* Updated function prototypes.
@@ -5707,6 +5709,14 @@ typedef int _MBG_API MBG_CHK_SUPP_FNC( MBG_DEV_HANDLE dh );
/* ----- function prototypes end ----- */
+#if defined( MBG_TGT_WIN32 )
+ // These functions are only required / used on Windows, so we exclude
+ // them from the automatically generated prototypes above.
+ void mbgdevio_syn1588_get_lock_win32( void );
+ void mbgdevio_syn1588_release_lock_win32( void );
+#endif
+
+
/*HDR*/
/**
diff --git a/mbglib/common/nanotime.c b/mbglib/common/nanotime.c
index 8b0ff8c..c174c86 100644
--- a/mbglib/common/nanotime.c
+++ b/mbglib/common/nanotime.c
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: nanotime.c 1.10 2021/10/20 07:27:18Z thomas-b REL_M $
+ * $Id: nanotime.c 1.11 2022/06/23 14:48:23Z martin.burnicki REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -11,7 +11,9 @@
*
* -----------------------------------------------------------------------
* $Log: nanotime.c $
- * Revision 1.10 2021/10/20 07:27:18Z thomas-b
+ * Revision 1.11 2022/06/23 14:48:23Z martin.burnicki
+ * Changed the return value of some snprintf_ functions from size_t to int.
+ * Revision 1.10 2021/10/20 07:27:18 thomas-b
* Fixed conversion between fractions of TM_GPS and ns in NANO_TIME_64
* Revision 1.9 2019/08/21 10:34:55 thomas-b
* Call mbg_mktime64 in conversion from and to NANO_TIME_64, because secs value is int64_t, anyway
@@ -112,7 +114,7 @@ void double_to_nano_time( NANO_TIME *p, double d )
* @param[in] max_len Size of the output buffer for 0-terminated string
* @param[in] nt The ::NANO_TIME to be printed
*/
-size_t snprint_nano_time( char *s, size_t max_len, const NANO_TIME *nt )
+int snprint_nano_time( char *s, size_t max_len, const NANO_TIME *nt )
{
size_t n = snprintf_safe( s, max_len, "%c%li.%09li",
_nano_time_negative( nt ) ? '-' : '+',
@@ -214,7 +216,7 @@ void double_to_nano_time_64( NANO_TIME_64 *p, double d )
* @param[in] max_len Size of the output buffer for 0-terminated string
* @param[in] nt The ::NANO_TIME_64 to be printed
*/
-size_t snprint_nano_time_64( char *s, size_t max_len, const NANO_TIME_64 *nt )
+int snprint_nano_time_64( char *s, size_t max_len, const NANO_TIME_64 *nt )
{
size_t n = snprintf_safe( s, max_len, "%c%" PRId64 ".%09" PRId64,
_nano_time_negative( nt ) ? '-' : '+',
diff --git a/mbglib/common/nanotime.h b/mbglib/common/nanotime.h
index 942f3c9..afceea2 100644
--- a/mbglib/common/nanotime.h
+++ b/mbglib/common/nanotime.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: nanotime.h 1.4 2019/08/19 11:10:02Z martin REL_M $
+ * $Id: nanotime.h 1.5 2022/06/23 14:48:30Z martin.burnicki REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -10,7 +10,9 @@
*
* -----------------------------------------------------------------------
* $Log: nanotime.h $
- * Revision 1.4 2019/08/19 11:10:02Z martin
+ * Revision 1.5 2022/06/23 14:48:30Z martin.burnicki
+ * Changed the return value of some snprintf_ functions from size_t to int.
+ * Revision 1.4 2019/08/19 11:10:02 martin
* Updated doxygen comments.
* Revision 1.3 2018/11/21 11:27:26 martin
* Include stdlib.h to provide size_t.
@@ -83,7 +85,7 @@ extern "C" {
* @param[in] max_len Size of the output buffer for 0-terminated string
* @param[in] nt The ::NANO_TIME to be printed
*/
- size_t snprint_nano_time( char *s, size_t max_len, const NANO_TIME *nt ) ;
+ int snprint_nano_time( char *s, size_t max_len, const NANO_TIME *nt ) ;
/**
* @brief Normalize a ::NANO_TIME_64 time
@@ -124,7 +126,7 @@ extern "C" {
* @param[in] max_len Size of the output buffer for 0-terminated string
* @param[in] nt The ::NANO_TIME_64 to be printed
*/
- size_t snprint_nano_time_64( char *s, size_t max_len, const NANO_TIME_64 *nt ) ;
+ int snprint_nano_time_64( char *s, size_t max_len, const NANO_TIME_64 *nt ) ;
/**
* @brief Set up a ::NANO_TIME_64 structure from a string with a time in seconds and fractions
diff --git a/mbglib/win32/mbgsvctl.h b/mbglib/win32/mbgsvctl.h
index 2bde282..f824d36 100644
--- a/mbglib/win32/mbgsvctl.h
+++ b/mbglib/win32/mbgsvctl.h
@@ -1,7 +1,7 @@
/**************************************************************************
*
- * $Id: mbgsvctl.h 1.34 2021/10/25 14:39:59Z martin REL_M $
+ * $Id: mbgsvctl.h 1.36 2022/05/31 13:20:06Z martin.burnicki REL_M $
*
* Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
*
@@ -10,6 +10,10 @@
*
* -----------------------------------------------------------------------
* $Log: mbgsvctl.h $
+ * Revision 1.36 2022/05/31 13:20:06Z martin.burnicki
+ * Updated function prototypes.
+ * Revision 1.35 2022/04/20 19:41:48Z martin.burnicki
+ * Updated doxygen comments.
* Revision 1.34 2021/10/25 14:39:59Z martin
* Updated function prototypes.
* Revision 1.33 2021/10/20 16:05:27Z martin
@@ -230,7 +234,18 @@ _ext _MBG_API_ATTR_VAR long syn1588_devices_found;
_MBG_API_ATTR int _MBG_API mbgsvctl_check_version( int header_version ) ;
_MBG_API_ATTR void _MBG_API mbgsvctl_log_mbgdevio_error( DWORD ioctl, DWORD sys_rc ) ;
+ /**
+ * @brief Print date and time of a @a SYSTEMTIME structure into a string.
+ *
+ * @param[out] s Pointer to the output buffer.
+ * @param[in] max_len Size of the output buffer.
+ * @param[in] st Address of a Windows @a SYSTEMTIME structure.
+ *
+ * @return The number of characters written to the output buffer @p s,
+ * except the terminating 0.
+ */
_MBG_API_ATTR int _MBG_API snprint_system_time( char *s, size_t max_len, const SYSTEMTIME *st ) ;
+
/**
* @brief Register an event source.
*
@@ -252,25 +267,25 @@ _ext _MBG_API_ATTR_VAR long syn1588_devices_found;
/**
*@brief Generate a log message according to a message ID.
*
- * TODO
+ * Generate a log message depending on a message ID specified in <em>mbg_msgs.mc</em>.
*
- * @param[in] msg_id One of the message IDs defined in <em>messages.mc</em>, or a system message ID.
+ * @param[in] msg_id One of the message IDs defined in <em>mbg_msgs.mc</em>, or a system message ID.
* @param[in] sys_rc @a ERROR_SUCCESS (== 0), or one of the win32 system error codes.
* @param[in] fmt An optional format string, or @a NULL.
* @param[in] info_1 A string parameter, if required by the format string, else @a NULL.
* @param[in] info_2 A second string parameter, if required by the format string, else @a NULL.
*
- * @see ::mbg_svc_log_msg
+ * @see ::mbg_svc_log_mbg_error
*/
_MBG_API_ATTR void _MBG_API mbg_svc_log_msg( DWORD msg_id, DWORD sys_rc, const char *fmt, const char *info_1, const char *info_2 ) ;
/**
*@brief Generate a log message depending on a Meinberg error code.
*
- * Unlike the ::mbg_svc_log_msg which expects a message ID as specified
- * e.g. in @ref MBG_WIN_MSG_IDS, this function just expects one of the
- * @ref MBG_ERROR_CODES which is converted to a message ID and passed
- * to ::mbg_svc_log_msg to actually generate the log message.
+ * @deprecated This function is deprecated, use ::mbg_svc_log_mbg_errno instead.
+ *
+ * If the @p mbg_errno number is not listed in the <em>mbg_msgs.mc</em> file
+ * this function will only log an empty string.
*
* @param[in] mbg_errno One of the @ref MBG_ERROR_CODES to be converted to a message ID
* to be passed to ::mbg_svc_log_msg.
@@ -278,9 +293,27 @@ _ext _MBG_API_ATTR_VAR long syn1588_devices_found;
* @param[in] info_1 A string parameter passed to ::mbg_svc_log_msg, depending on the format string.
* @param[in] info_2 Another string parameter passed to ::mbg_svc_log_msg, depending on the format string.
*
+ * @see ::mbg_svc_log_mbg_errno
+ */
+ _MBG_API_ATTR void _DEPRECATED_BY( "mbg_svc_log_mbg_errno" ) _MBG_API mbg_svc_log_mbg_error( int mbg_errno, const char *fmt, const char *info_1, const char *info_2 ) ;
+
+ /**
+ *@brief Generate a log message depending on a Meinberg error code.
+ *
+ * Unlike the ::mbg_svc_log_mbg_error function which requires message IDs
+ * and associated strings to be defined in <em>mbg_msgs.mc</em>, this function
+ * just expects one of the generic message IDs MBG_MSG_ERROR, MBG_MSG_WARNING,
+ * or MBG_MSG_INFO as a severity indicator, and calls ::mbg_strerror to
+ * retrieve a string associated with the error code. The associated information
+ * is then passed to ::mbg_svc_log_msg to actually generate the log message.
+ *
+ * @param[in] msg_id One of the generic messaged IDs MBG_MSG_ERROR, MBG_MSG_WARNING,
+ * or MBG_MSG_INFO, defined in <em>mbg_msgs.mc</em>.
+ * @param[in] mbg_errno One of the @ref MBG_ERROR_CODES.
+ *
* @see ::mbg_svc_log_msg
*/
- _MBG_API_ATTR void _MBG_API mbg_svc_log_mbg_error( int mbg_errno, const char *fmt, const char *info_1, const char *info_2 ) ;
+ _MBG_API_ATTR void _MBG_API mbg_svc_log_mbg_errno( DWORD msg_id, int mbg_errno ) ;
/**
* @brief Check if the calling process has admin rights.
@@ -340,14 +373,14 @@ _ext _MBG_API_ATTR_VAR long syn1588_devices_found;
_MBG_API_ATTR int _MBG_API mbg_svc_find_devices( void ) ;
/**
- * @brief Search for Meinberg PnP devices and set up a device list.
+ * @brief Search for supported devices and set up a device list.
*
* The allocated list can be freed by calling ::mbg_svc_free_device_list.
*
* @param[out] p_list Pointer to the list to be set up.
* @param[in] max_devices Max number of entries to be added to the list. TODO Make this obsolete.
*
- * @return The number of Meinberg PnP devices in the list
+ * @return The number of devices in the allocated list.
*/
_MBG_API_ATTR int _MBG_API mbg_svc_find_devices_with_hw_id( MBG_DEV_FN_LIST_ENTRY **p_list, int max_devices ) ;
@@ -355,7 +388,7 @@ _ext _MBG_API_ATTR_VAR long syn1588_devices_found;
* @brief Get a device path string for a device from a global list.
*
* The list of devices must have been set up before
- * by calling ::mbg_svc_find_pnp_devices.
+ * by calling ::mbg_svc_find_devices.
*
* @param[in] dev_idx The index of the device in the list.
*