Fawkes API  Fawkes Development Version
fuse_lut_content.h
1 
2 /***************************************************************************
3  * fuse_lut_content.h - FUSE LUT content encapsulation
4  *
5  * Created: Wed Nov 21 16:47:53 2007
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _FIREVISION_FVUTILS_NET_FUSE_LUT_CONTENT_H_
25 #define _FIREVISION_FVUTILS_NET_FUSE_LUT_CONTENT_H_
26 
27 #include <fvutils/net/fuse.h>
28 #include <fvutils/net/fuse_message_content.h>
29 #include <sys/types.h>
30 
31 namespace firevision {
32 
33 class SharedMemoryLookupTable;
34 
35 class FuseLutContent : public FuseMessageContent
36 {
37 public:
38  FuseLutContent(const char * lut_id,
39  void * buffer,
40  unsigned int width,
41  unsigned int height,
42  unsigned int depth,
43  unsigned int bpc);
45  FuseLutContent(uint32_t type, void *payload, size_t payload_size);
46  virtual ~FuseLutContent();
47 
48  const char * lut_id() const;
49  unsigned char *buffer() const;
50  size_t buffer_size() const;
51  unsigned int width() const;
52  unsigned int height() const;
53  unsigned int depth() const;
54  unsigned int bytes_per_cell() const;
55 
56  virtual void serialize();
57 
58 private:
59  char * lut_id_;
60  unsigned char * buffer_;
61  size_t buffer_size_;
63 };
64 
65 } // end namespace firevision
66 
67 #endif
firevision::FuseLutContent::bytes_per_cell
unsigned int bytes_per_cell() const
Bytes per cell in LUT.
Definition: fuse_lut_content.cpp:205
firevision::FuseLutContent::height
unsigned int height() const
Height of LUT.
Definition: fuse_lut_content.cpp:187
firevision::FuseLutContent::serialize
virtual void serialize()
Definition: fuse_lut_content.cpp:211
firevision::FuseMessageContent::payload_size
virtual size_t payload_size() const
Return payload size.
Definition: fuse_message_content.cpp:92
firevision::FuseLutContent
Definition: fuse_lut_content.h:41
firevision::FUSE_lut_message_header_t
Lookup table packet header.
Definition: fuse.h:112
firevision::FuseLutContent::depth
unsigned int depth() const
Depth of LUT.
Definition: fuse_lut_content.cpp:196
firevision::FuseMessageContent::payload
virtual void * payload() const
Return pointer to payload.
Definition: fuse_message_content.cpp:78
firevision::FuseLutContent::width
unsigned int width() const
Width of LUT.
Definition: fuse_lut_content.cpp:178
firevision::FuseLutContent::buffer_size
size_t buffer_size() const
Get buffer size.
Definition: fuse_lut_content.cpp:169
firevision::SharedMemoryLookupTable
Definition: shm_lut.h:112
firevision::FuseLutContent::FuseLutContent
FuseLutContent(const char *lut_id, void *buffer, unsigned int width, unsigned int height, unsigned int depth, unsigned int bpc)
Constructor.
Definition: fuse_lut_content.cpp:114
firevision::FuseLutContent::lut_id
const char * lut_id() const
Get LUT ID.
Definition: fuse_lut_content.cpp:151
firevision::FuseLutContent::buffer
unsigned char * buffer() const
Get buffer.
Definition: fuse_lut_content.cpp:160