bionet-util.h

来自「MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis」· C头文件 代码 · 共 65 行

H
65
字号
#ifndef __BIONET_UTIL_H#define __BIONET_UTIL_H#include <stdint.h>#include <sys/time.h>#include <glib.h>#include "bionet-resource.h"#include "bionet-node.h"#include "bionet-hab.h"//// The bionet code uses glib's logging facility to log internal messages,// and this is the domain.//#define  BIONET_LOG_DOMAIN  "bionet"// // General utility functions//// Returns true (1) if str matches [-a-zA-Z0-9]+, false (0) if not.int bionet_is_valid_name_component(const char *str);//// puts the glib log messages where you want them//typedef struct {    enum {        BIONET_LOG_TO_STDOUT = 0,        BIONET_LOG_TO_SYSLOG = 1    } destination;    // messages with log_level *below* log_limit are logged, all others are dropped    // FIXME: really we want a default log_limit and then optional per-domain limits    GLogLevelFlags log_limit;} bionet_log_context_t;void  bionet_glib_log_handler(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer log_context);void log_hexdump(const char *log_domain, GLogLevelFlags log_level, const void *data, int count);#endif // __BIONET_UTIL_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?