EPICS ARCHIVER V4
Main Page
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
trunk
ea4-cpp
include
common
tools
BinIO.h
1
#ifndef BIN_IO_H
2
#define BIN_IO_H
3
4
#include <stdio.h>
5
#include <stdint.h>
6
9
11
15
17
bool
writeLong
(FILE *f, uint32_t value);
18
20
bool
readLong
(FILE *f, uint32_t *value);
21
23
bool
writeShort
(FILE *f, uint16_t value);
24
26
bool
readShort
(FILE *f, uint16_t *value);
27
29
inline
bool
writeByte
(FILE *f, uint8_t byte)
30
{
return
fwrite(&byte, 1, 1, f) == 1; }
31
33
inline
bool
readByte
(FILE *f, uint8_t *byte)
34
{
return
fread(byte, 1, 1, f) == 1; }
35
37
38
#endif
39
// BIN_IO_H
40
41
writeShort
bool writeShort(FILE *f, uint16_t value)
Write 'value' to file with fixed byte order.
readByte
bool readByte(FILE *f, uint8_t *byte)
Read byte.
Definition:
BinIO.h:33
readLong
bool readLong(FILE *f, uint32_t *value)
Read 'value' from file with fixed byte order.
writeByte
bool writeByte(FILE *f, uint8_t byte)
Write byte.
Definition:
BinIO.h:29
readShort
bool readShort(FILE *f, uint16_t *value)
Read 'value' from file with fixed byte order.
writeLong
bool writeLong(FILE *f, uint32_t value)
OS-independent binary I/O.
Generated on Tue Dec 17 2013 11:07:27 for EPICS ARCHIVER V4 by
1.8.5