Container Map Demo

Overview

There is an example implementation of the Container Map Demo application available in the apps folder. This implementation demonstrates all the API functions and provides a sample usage scenario.

Features

  • This application initializes the container map, inserts key-value pairs, retrieves values, deletes entries, and verifies the presence of keys.

  • In every API for this module, the container map buffer is provided by the user.

Example Use Case

The Container Map maintains key-value pairs based on a sorted singly linked list. Data can be inserted, retrieved, checked for existence, deleted, and cleared. Below is an example usage:

Example input data:

****** DATA TYPES LIST ******
1.String data type
2.Signed/Unsigned 8bit data type - int8
3.Unsigned 8bit data type - uint8
4.Signed 16bit data type - int16
5.Unsigned 16bit data type - uint16
6.Signed 32bit data type - int32
7.Unsigned 32bit data type - uint32
8.Single precision data type - float

Enter Key data type : 7
Enter Value data type : 8

****** MENU ******

1.To Set Map
2.To Get Map
3.To Get number of map entries
4.To Erase Map
5.To Erase all map
6.To check whether map is full or not
7.To display the map data

Set Map Operation:
Enter Key: 42
Enter Value: 100.2
Key-Value pair successfully inserted into the container map

Get Map Operation:
Enter Key: 42
Get Value: 100.2

Erase operation:
Enter Key: 42
Key successfully deleted from the container map

Container Map Driver

Please refer to the section below: