uuu
uuu (Universal Update Utility), mfgtools 3.0
 
Loading...
Searching...
No Matches
bmap.cpp File Reference
#include <map>
#include <tinyxml2.h>
#include "bmap.h"
#include "buffer.h"
#include "libcomm.h"
#include "libuuu.h"

Functions

bmap_mode uuu_get_bmap_mode ()
 
int uuu_set_bmap_mode (bmap_mode mode)
 
static bool parse_image_size (bmap_t &bmap, const tinyxml2::XMLElement *elem)
 
static bool parse_block_size (bmap_t &bmap, const tinyxml2::XMLElement *elem)
 
static bool parse_blocks_count (bmap_t &bmap, const tinyxml2::XMLElement *elem)
 
static bool parse_block_map (bmap_t &bmap, const tinyxml2::XMLElement *elem)
 
void send_info (std::string msg)
 
int load_bmap (const std::string &filename, bmap_t &bmap)
 

Variables

bmap_mode g_bmap_mode = bmap_mode::Default
 
static const std::map< std::string, bool(*)(bmap_t &, const tinyxml2::XMLElement *)> handlers
 

Function Documentation

◆ load_bmap()

int load_bmap ( const std::string & filename,
bmap_t & bmap )

◆ parse_block_map()

static bool parse_block_map ( bmap_t & bmap,
const tinyxml2::XMLElement * elem )
static

◆ parse_block_size()

static bool parse_block_size ( bmap_t & bmap,
const tinyxml2::XMLElement * elem )
static

◆ parse_blocks_count()

static bool parse_blocks_count ( bmap_t & bmap,
const tinyxml2::XMLElement * elem )
static

◆ parse_image_size()

static bool parse_image_size ( bmap_t & bmap,
const tinyxml2::XMLElement * elem )
static

◆ send_info()

void send_info ( std::string msg)

◆ uuu_get_bmap_mode()

bmap_mode uuu_get_bmap_mode ( )

◆ uuu_set_bmap_mode()

int uuu_set_bmap_mode ( bmap_mode mode)

Variable Documentation

◆ g_bmap_mode

◆ handlers

const std::map<std::string, bool (*)(bmap_t &, const tinyxml2::XMLElement*)> handlers
static
Initial value:
{
{ "ImageSize", parse_image_size },
{ "BlockSize", parse_block_size },
{ "BlocksCount", parse_blocks_count },
{ "BlockMap", parse_block_map },
}
static bool parse_block_size(bmap_t &bmap, const tinyxml2::XMLElement *elem)
Definition bmap.cpp:62
static bool parse_blocks_count(bmap_t &bmap, const tinyxml2::XMLElement *elem)
Definition bmap.cpp:73
static bool parse_block_map(bmap_t &bmap, const tinyxml2::XMLElement *elem)
Definition bmap.cpp:84
static bool parse_image_size(bmap_t &bmap, const tinyxml2::XMLElement *elem)
Definition bmap.cpp:51