Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-stream-ch-chain
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-stream-ch-chain
Commits
e4d293af
Commit
e4d293af
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] Some renames, added static ragne request structure
parent
5fc98cfe
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dap_stream_ch_chain.c
+3
-2
3 additions, 2 deletions
dap_stream_ch_chain.c
dap_stream_ch_chain.h
+4
-2
4 additions, 2 deletions
dap_stream_ch_chain.h
dap_stream_ch_chain_pkt.h
+10
-13
10 additions, 13 deletions
dap_stream_ch_chain_pkt.h
with
17 additions
and
17 deletions
dap_stream_ch_chain.c
+
3
−
2
View file @
e4d293af
...
...
@@ -61,11 +61,12 @@ static void s_stream_ch_packet_out(dap_stream_ch_t* a_ch , void* a_arg);
int
dap_stream_ch_chain_init
()
{
log_it
(
L_NOTICE
,
"Chain blocks and datums exchange channel initialized"
);
dap_stream_ch_proc_add
(
'C'
,
s_stream_ch_new
,
s_stream_ch_delete
,
s_stream_ch_packet_in
,
s_stream_ch_packet_out
);
dap_stream_ch_proc_add
(
dap_stream_ch_chain_get_id
()
,
s_stream_ch_new
,
s_stream_ch_delete
,
s_stream_ch_packet_in
,
s_stream_ch_packet_out
);
return
0
;
}
/**
* @brief dap_stream_ch_chain_deinit
*/
...
...
@@ -112,7 +113,7 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch , void* a_arg)
dap_chain_t
*
l_chain
=
dap_chain_find_by_id
(
l_chain_pkt
->
hdr
.
net_id
,
l_chain_pkt
->
hdr
.
chain_id
);
if
(
l_chain
)
{
switch
(
l_chain_pkt
->
hdr
.
type
)
{
case
STREAM_CH_CHAIN_PKT_TYPE_REQUEST
:{
case
STREAM_CH_CHAIN_PKT_TYPE_
SYNC_CHAINS_
REQUEST
:{
}
break
;
case
STREAM_CH_CHAIN_PKT_TYPE_DATUM
:{
}
break
;
...
...
This diff is collapsed.
Click to expand it.
dap_stream_ch_chain.h
+
4
−
2
View file @
e4d293af
...
...
@@ -24,6 +24,8 @@
#pragma once
int
dap_stream_ch_chain_init
();
void
dap_stream_ch_chain_deinit
();
#include
<stdint.h>
int
dap_stream_ch_chain_init
(
void
);
void
dap_stream_ch_chain_deinit
(
void
);
inline
static
uint8_t
dap_stream_ch_chain_get_id
(
void
)
{
return
(
uint8_t
)
'C'
;
}
This diff is collapsed.
Click to expand it.
dap_stream_ch_chain_pkt.h
+
10
−
13
View file @
e4d293af
...
...
@@ -30,25 +30,22 @@
#include
"dap_chain_datum.h"
#include
"dap_chain_cs.h"
#define STREAM_CH_CHAIN_PKT_TYPE_REQUEST 0x00
#define STREAM_CH_CHAIN_PKT_TYPE_BLOCK 0x11
#define STREAM_CH_CHAIN_PKT_TYPE_DATUM 0x12
#define STREAM_CH_CHAIN_PKT_TYPE_GLOVAL_DB 0x13
#define STREAM_CH_CHAIN_PKT_TYPE_
SYNC_CHAINS_
REQUEST 0x00
#define STREAM_CH_CHAIN_PKT_TYPE_BLOCK
0x11
#define STREAM_CH_CHAIN_PKT_TYPE_DATUM
0x12
#define STREAM_CH_CHAIN_PKT_TYPE_GLOVAL_DB
0x13
typedef
union
dap_stream_ch_chain_request
{
enum
{
CHAIN_REQUEST_CHAIN_BLOCKS_RANGE_HASH
,
CHAIN_REQUEST_CHAIN_BLOCKS_RANGE_DATE
,
CHAIN_REQUEST_CHAIN_DATUM_RANGE_HASH
,
CHAIN_REQUEST_CHAIN_DATUM_RANGE_DATE
,
}
enums
:
16
;
uint16_t
u16
;
dap_chain_hash_fast_t
hash_from
;
dap_chain_hash_fast_t
hash_to
;
uint64_t
ts_from
;
uint64_t
ts_to
;
}
dap_stream_ch_chain_request_t
;
typedef
struct
dap_stream_ch_chain_pkt_hdr
{
dap_chain_id_t
chain_id
;
dap_chain_net_id_t
net_id
;
dap_chain_cell_id_t
shard_id
;
dap_chain_id_t
chain_id
;
dap_chain_cell_id_t
cell_id
;
uint8_t
type
;
uint8_t
padding1
[
3
];
uint64_t
tid
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment