Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-camogm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-camogm
Commits
840f15d3
Commit
840f15d3
authored
Jul 01, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'read_all_files' and 'read_disk' commands
parent
63bf56d0
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
207 additions
and
60 deletions
+207
-60
Makefile
Makefile
+1
-1
camogm.c
camogm.c
+2
-2
camogm.h
camogm.h
+5
-3
camogm_read.c
camogm_read.c
+193
-53
camogm_read.h
camogm_read.h
+6
-1
No files found.
Makefile
View file @
840f15d3
...
...
@@ -27,7 +27,7 @@ CFLAGS += -Wall -I$(ELPHEL_KERNEL_DIR)/include/elphel
all
:
$(PROGS)
$(PROGS)
:
$(OBJS)
$(CC)
$(LDFLAGS)
$^
$(LDLIBS)
-logg
-pthread
-o
$@
$(CC)
$(LDFLAGS)
$^
$(LDLIBS)
-logg
-pthread
-
lm
-
o
$@
install
:
$(PROGS)
$(INSTALL)
-d
$(INSTDIR)
$(INSTALL)
-m
$(INSTMODE)
-o
$(INSTOWNER)
-g
$(INSTGROUP)
$(PROGS)
$(INSTDIR)
...
...
camogm.c
View file @
840f15d3
...
...
@@ -231,7 +231,7 @@ void camogm_init(camogm_state *state, char *pipe_name)
state
->
rawdev
.
curr_pos_w
=
state
->
rawdev
.
start_pos
;
state
->
rawdev
.
curr_pos_r
=
state
->
rawdev
.
start_pos
;
state
->
active_chn
=
ALL_CHN_ACTIVE
;
state
->
rawdev
.
mmap_size
=
MMAP_CHUNK_SIZE
;
state
->
rawdev
.
mmap_
default_
size
=
MMAP_CHUNK_SIZE
;
}
/**
...
...
@@ -803,7 +803,7 @@ void camogm_set_prefix(camogm_state *state, const char * p, path_type type)
D0
(
fprintf
(
debug_file
,
"WARNING: raw device write initiated
\n
"
));
state
->
rawdev_op
=
1
;
/* debug code follows */
state
->
rawdev
.
end_pos
=
1
0485760
;
// 10 Mib
state
->
rawdev
.
end_pos
=
1
34217728
;
/* end of debug code */
}
}
...
...
camogm.h
View file @
840f15d3
...
...
@@ -60,7 +60,7 @@
#define RAWDEV_START_OFFSET 1024
/** @brief Maximum length of file or raw device path */
#define ELPHEL_PATH_MAX 300
#define MMAP_CHUNK_SIZE 1
34217728
#define MMAP_CHUNK_SIZE 1
0485760
/**
* @enum state_flags
...
...
@@ -100,8 +100,10 @@ typedef struct {
uint64_t
start_pos
;
uint64_t
end_pos
;
uint64_t
curr_pos_w
;
uint64_t
*
disk_mmap
;
uint64_t
mmap_size
;
unsigned
char
*
disk_mmap
;
uint64_t
mmap_default_size
;
uint64_t
mmap_current_size
;
uint64_t
mmap_offset
;
volatile
uint64_t
curr_pos_r
;
uint64_t
file_start
;
pthread_t
tid
;
...
...
camogm_read.c
View file @
840f15d3
This diff is collapsed.
Click to expand it.
camogm_read.h
View file @
840f15d3
...
...
@@ -35,7 +35,12 @@ struct disk_idir {
size_t
size
;
};
void
*
build_index
(
void
*
arg
);
struct
range
{
uint64_t
from
;
uint64_t
to
;
};
//void *build_index(void *arg);
void
*
reader
(
void
*
arg
);
#endif
/* _CAMOGM_READ_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment