Comments (7)
没有太明白你的需求,可否详细举例说明一下
from flashdb.
比方说我在EasyFlash里面存了一个结构体数组a[100],每个数组元素a[]是一个结构体,我想从Flash读取a[50]的内容,我不需要把整个a[0]~a[100]读出来,可以通过偏移量的方式直接读取a[50]的内容.
from flashdb.
FlashDB 如何知道 a[50] 的偏移地址,并返回给用户呢?
from flashdb.
用户通过参数输入,比方说50*单个结构体长度,存放的变量也是用输入。
from flashdb.
有个比较粗暴的方法,可以试试
- 获取到 kv 对象,得到 kv 偏移地址 https://armink.github.io/FlashDB/#/zh-cn/api?id=%e8%8e%b7%e5%8f%96-kv-%e5%af%b9%e8%b1%a1
- 通过
_fdb_flash_read
API 来读取
from flashdb.
这样的话需要外部提供一个很大的局部变量或者全局变量来暂存数据吧?
from flashdb.
不用的,_fdb_flash_read 本身就是可以直接基于 offset 来读取
from flashdb.
Related Issues (20)
- KVDB在写满后再次写入失败,需要写入第二次 HOT 1
- 请教 KVDB 掉电异常后的恢复方法
- 测试tsdb连续保存累计数达一定数量后出现前面部分数据丢失的现象 HOT 2
- 用文件作为存储后端,有锁首次初始化时,_fdb_kv_load 中调用 fdb_kv_set_default 死锁 HOT 2
- 老化擦写Flash的KV后,读取一个不存在的KV或者写一个不存在的KV,Flash耗时长
- check the current timestamp, MUST more than the last save timestamp HOT 4
- 是否支持STM32G0B1RCT6 HOT 6
- 分区越大,插入速度越慢 HOT 2
- sfud_flash_def.h 部分有误 HOT 4
- KVDB Demo 运行出错 HOT 1
- linux的demo程序第一次运行都会卡住 HOT 2
- Error: The KV (@0x0000FF4F) CRC32 check failed!
- Support wear balance
- tsdb
- FR:tsdb读取最新一条数据内容 HOT 1
- TSDB能否调整为递增序列式。 HOT 1
- V2.1.0使用tsdb遇到一个问题,假如tsdb刚好全部写满的时候重启了,再次开机 初始化tsdb的时候,会出现oldest sectors is 0x00000FFF, current using sector is 0xFFFFFFFF, 导致后续无法写入 HOT 1
- 迭代器无法遍历所有键值对 HOT 2
- FDB_GC_EMPTY_SEC_THRESHOLD我想问这个能设置成0吗,我现在只想分配2个扇区给flashDB
- fdb_tsl_status_t end_info_stat[2]这里结束信息为啥需要2呢? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flashdb.