SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
Commands.h
Go to the documentation of this file.
1
/*
2
* SWC-DB© Copyright since 2019 Alex Kashirin <kashirin.alex@gmail.com>
3
* License details at <https://github.com/kashirin-alex/swc-db/#license>
4
*/
5
6
#ifndef swcdb_fs_Broker_Protocol_Commands_h
7
#define swcdb_fs_Broker_Protocol_Commands_h
8
9
10
#include "
swcdb/core/Compat.h
"
11
12
13
namespace
SWC
{
namespace
Comm {
namespace
Protocol {
14
15
16
22
namespace
FsBroker {
23
24
// FsBroker Protocol Commands
25
enum
Command
: uint8_t {
26
NOT_IMPLEMENTED
= 0x00,
27
FUNCTION_OPEN
= 0x01,
28
FUNCTION_CREATE
= 0x02,
29
FUNCTION_CLOSE
= 0x03,
30
FUNCTION_READ
= 0x04,
31
FUNCTION_APPEND
= 0x05,
32
FUNCTION_SEEK
= 0x06,
33
FUNCTION_REMOVE
= 0x07,
34
FUNCTION_LENGTH
= 0x08,
35
FUNCTION_PREAD
= 0x09,
36
FUNCTION_MKDIRS
= 0x0a,
37
FUNCTION_FLUSH
= 0x0b,
38
FUNCTION_RMDIR
= 0x0c,
39
FUNCTION_READDIR
= 0x0d,
40
FUNCTION_EXISTS
= 0x0e,
41
FUNCTION_RENAME
= 0x0f,
42
FUNCTION_SYNC
= 0x10,
43
FUNCTION_WRITE
= 0x11,
44
FUNCTION_READ_ALL
= 0x12,
45
FUNCTION_COMBI_PREAD
= 0x13,
46
47
FUNCTION_DEBUG
= 0x14,
48
FUNCTION_STATUS
= 0x14,
49
FUNCTION_SHUTDOWN
= 0x14,
50
MAX_CMD
= 0x14
51
};
52
53
struct
Commands
{
54
static
constexpr
const
uint8_t
MAX
=
MAX_CMD
;
55
56
static
const
char
*
SWC_CONST_FUNC
to_string
(uint8_t cmd) noexcept;
57
};
58
59
}
60
61
}}}
62
63
64
65
#if defined(SWC_IMPL_SOURCE) or \
66
(defined(FS_BROKER_APP) and !defined(BUILTIN_FS_BROKER))
67
#include "
swcdb/fs/Broker/Protocol/Commands.cc
"
68
#endif
69
70
71
#endif // swcdb_fs_Broker_Protocol_Commands_h
SWC::Comm::Protocol::FsBroker::FUNCTION_STATUS
@ FUNCTION_STATUS
Status.
Definition:
Commands.h:48
SWC::Comm::Protocol::FsBroker::FUNCTION_PREAD
@ FUNCTION_PREAD
Pread.
Definition:
Commands.h:35
SWC::Comm::Protocol::FsBroker::FUNCTION_SEEK
@ FUNCTION_SEEK
Seek.
Definition:
Commands.h:32
SWC::Comm::Protocol::FsBroker::FUNCTION_REMOVE
@ FUNCTION_REMOVE
Remove.
Definition:
Commands.h:33
SWC::Comm::Protocol::FsBroker::Commands
Definition:
Commands.h:53
SWC::Comm::Protocol::FsBroker::FUNCTION_CREATE
@ FUNCTION_CREATE
Create.
Definition:
Commands.h:28
SWC::Comm::Protocol::FsBroker::FUNCTION_SYNC
@ FUNCTION_SYNC
Sync.
Definition:
Commands.h:42
SWC::Comm::Protocol::FsBroker::FUNCTION_READDIR
@ FUNCTION_READDIR
Readdir.
Definition:
Commands.h:39
Commands.cc
SWC::Comm::Protocol::FsBroker::NOT_IMPLEMENTED
@ NOT_IMPLEMENTED
Not Implemented.
Definition:
Commands.h:26
SWC::Comm::Protocol::FsBroker::FUNCTION_WRITE
@ FUNCTION_WRITE
Write.
Definition:
Commands.h:43
SWC::Comm::Protocol::FsBroker::FUNCTION_READ
@ FUNCTION_READ
Read.
Definition:
Commands.h:30
SWC::Comm::Protocol::FsBroker::FUNCTION_RMDIR
@ FUNCTION_RMDIR
Rmdir.
Definition:
Commands.h:38
SWC_CONST_FUNC
#define SWC_CONST_FUNC
Definition:
Compat.h:107
SWC::Comm::Protocol::FsBroker::FUNCTION_APPEND
@ FUNCTION_APPEND
Append.
Definition:
Commands.h:31
SWC
The SWC-DB C++ namespace 'SWC'.
Definition:
main.cc:12
SWC::Comm::Protocol::FsBroker::FUNCTION_OPEN
@ FUNCTION_OPEN
Open.
Definition:
Commands.h:27
SWC::Comm::Protocol::FsBroker::FUNCTION_LENGTH
@ FUNCTION_LENGTH
Length.
Definition:
Commands.h:34
Compat.h
SWC::Comm::Protocol::FsBroker::MAX_CMD
@ MAX_CMD
Maximum code marker.
Definition:
Commands.h:50
SWC::Comm::Protocol::FsBroker::FUNCTION_MKDIRS
@ FUNCTION_MKDIRS
Mkdirs.
Definition:
Commands.h:36
SWC::Comm::Protocol::FsBroker::FUNCTION_SHUTDOWN
@ FUNCTION_SHUTDOWN
Shutdown.
Definition:
Commands.h:49
SWC::Comm::Protocol::FsBroker::Command
Command
Definition:
Commands.h:25
SWC::Comm::Protocol::FsBroker::FUNCTION_FLUSH
@ FUNCTION_FLUSH
Flush.
Definition:
Commands.h:37
SWC::Comm::Protocol::FsBroker::Commands::to_string
static const char *SWC_CONST_FUNC to_string(uint8_t cmd) noexcept
Definition:
Commands.cc:13
SWC::Comm::Protocol::FsBroker::FUNCTION_READ_ALL
@ FUNCTION_READ_ALL
ReadAll.
Definition:
Commands.h:44
SWC::Comm::Protocol::FsBroker::FUNCTION_CLOSE
@ FUNCTION_CLOSE
Close.
Definition:
Commands.h:29
SWC::Comm::Protocol::FsBroker::FUNCTION_EXISTS
@ FUNCTION_EXISTS
Exists.
Definition:
Commands.h:40
SWC::Comm::Protocol::FsBroker::FUNCTION_COMBI_PREAD
@ FUNCTION_COMBI_PREAD
CombiPread open+pread+close.
Definition:
Commands.h:45
SWC::Comm::Protocol::FsBroker::FUNCTION_RENAME
@ FUNCTION_RENAME
Rename.
Definition:
Commands.h:41
SWC::Comm::Protocol::FsBroker::Commands::MAX
static constexpr const uint8_t MAX
Definition:
Commands.h:54
SWC::Comm::Protocol::FsBroker::FUNCTION_DEBUG
@ FUNCTION_DEBUG
Debug.
Definition:
Commands.h:47
include
swcdb
fs
Broker
Protocol
Commands.h
Generated on Sat Jun 3 2023 18:00:07 for SWC-DB by
1.8.20