Stefan Schuermans commited on 2017-05-20 17:43:49
Showing 10 changed files, with 98 additions and 98 deletions.
| ... | ... |
@@ -0,0 +1,33 @@ |
| 1 |
+<html> |
|
| 2 |
+ <head> |
|
| 3 |
+ <title>Blinker - EtherPix</title> |
|
| 4 |
+ </head> |
|
| 5 |
+ <body> |
|
| 6 |
+ <h1>Blinker - EtherPix</h1> |
|
| 7 |
+ <p> |
|
| 8 |
+ The <a href="http://www.fleixpix.de">EtherPix</a> module is used |
|
| 9 |
+ to output a stream to a EtherPix display. |
|
| 10 |
+ It is only functional if Blinker has been compiled against |
|
| 11 |
+ <a href="http://git.blinkenarea.org/?p=libetherpix">libetherpix</a>. |
|
| 12 |
+ </p> |
|
| 13 |
+ <h2>Configuration</h2> |
|
| 14 |
+ <p> |
|
| 15 |
+ The configuration of the EtherPix module with name <code>NAME</code> |
|
| 16 |
+ is located in the <code>etherpixes/NAME</code> subdirectory. |
|
| 17 |
+ </p> |
|
| 18 |
+ <h3>Input Stream</h3> |
|
| 19 |
+ <p> |
|
| 20 |
+ The file <code>instream</code> contains the name of the stream to |
|
| 21 |
+ read. |
|
| 22 |
+ The frames received from this stream are send to the EtherPix display. |
|
| 23 |
+ </p> |
|
| 24 |
+ <h3>EtherPix Configuration File</h3> |
|
| 25 |
+ <p> |
|
| 26 |
+ The file <code>etherpix.etp</code> is the EtherPix configuration |
|
| 27 |
+ file used to access the EtherPix display. |
|
| 28 |
+ It is a standard EtherPix configuration file as it is expected |
|
| 29 |
+ by libetherpix. |
|
| 30 |
+ </p> |
|
| 31 |
+ </body> |
|
| 32 |
+</html> |
|
| 33 |
+ |
| ... | ... |
@@ -1,33 +0,0 @@ |
| 1 |
-<html> |
|
| 2 |
- <head> |
|
| 3 |
- <title>Blinker - FlexiPix</title> |
|
| 4 |
- </head> |
|
| 5 |
- <body> |
|
| 6 |
- <h1>Blinker - FlexiPix</h1> |
|
| 7 |
- <p> |
|
| 8 |
- The <a href="http://www.fleixpix.de">FlexiPix</a> module is used |
|
| 9 |
- to output a stream to a FlexiPix display. |
|
| 10 |
- It is only functional if Blinker has been compiled against |
|
| 11 |
- <a href="http://git.blinkenarea.org/?p=libflexipix">libflexipix</a>. |
|
| 12 |
- </p> |
|
| 13 |
- <h2>Configuration</h2> |
|
| 14 |
- <p> |
|
| 15 |
- The configuration of the FlexiPix module with name <code>NAME</code> |
|
| 16 |
- is located in the <code>flexipixes/NAME</code> subdirectory. |
|
| 17 |
- </p> |
|
| 18 |
- <h3>Input Stream</h3> |
|
| 19 |
- <p> |
|
| 20 |
- The file <code>instream</code> contains the name of the stream to |
|
| 21 |
- read. |
|
| 22 |
- The frames received from this stream are send to the FlexiPix display. |
|
| 23 |
- </p> |
|
| 24 |
- <h3>FlexiPix Configuration File</h3> |
|
| 25 |
- <p> |
|
| 26 |
- The file <code>flexipix.flp</code> is the FlexiPix configuration |
|
| 27 |
- file used to access the FlexiPix display. |
|
| 28 |
- It is a standard FlexiPix configuration file as it is expected |
|
| 29 |
- by libflexipix. |
|
| 30 |
- </p> |
|
| 31 |
- </body> |
|
| 32 |
-</html> |
|
| 33 |
- |
| ... | ... |
@@ -99,7 +99,7 @@ |
| 99 | 99 |
<ul> |
| 100 | 100 |
<li><a href="canvas.html">Canvas</a></li> |
| 101 | 101 |
<li><a href="filter.html">Filter</a></li> |
| 102 |
- <li><a href="flexipix.html">FlexiPix</a></li> |
|
| 102 |
+ <li><a href="etherpix.html">EtherPix</a></li> |
|
| 103 | 103 |
<li><a href="loveletter.html">Loveletter</a></li> |
| 104 | 104 |
<li><a href="opprinter.html">Operator Connection Printer</a></li> |
| 105 | 105 |
<li><a href="opsplitter.html">Operator Connection Splitter</a></li> |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 |
-# FlexiPix configuration file |
|
| 1 |
+# EtherPix configuration file |
|
| 2 | 2 |
|
| 3 | 3 |
# the address to bind the local socket to |
| 4 |
-# - the FlexiPix network 10.70.80.0/16 must be reachable from this address |
|
| 4 |
+# - the EtherPix network 10.70.80.0/16 must be reachable from this address |
|
| 5 | 5 |
bindAddr = 0.0.0.0:0 |
| 6 | 6 |
|
| 7 | 7 |
# the size of the display |
| ... | ... |
@@ -10,15 +10,15 @@ |
| 10 | 10 |
#include <BlinkenLib/BlinkenFrame.h> |
| 11 | 11 |
#include <BlinkenLib/BlinkenProto.h> |
| 12 | 12 |
|
| 13 |
-#ifdef BLINKER_CFG_FLEXIPIX |
|
| 13 |
+#ifdef BLINKER_CFG_ETHERPIX |
|
| 14 | 14 |
extern "C" {
|
| 15 |
-#include <flexipix/flexipix.h> |
|
| 15 |
+#include <etherpix/etherpix.h> |
|
| 16 | 16 |
} // extern "C" |
| 17 | 17 |
#endif // #ifdef BLINKER_CFG_FLEIXPIX |
| 18 | 18 |
|
| 19 | 19 |
#include "Directory.h" |
| 20 | 20 |
#include "File.h" |
| 21 |
-#include "FlexiPix.h" |
|
| 21 |
+#include "EtherPix.h" |
|
| 22 | 22 |
#include "InStreamFile.h" |
| 23 | 23 |
#include "Mgrs.h" |
| 24 | 24 |
#include "Module.h" |
| ... | ... |
@@ -35,11 +35,11 @@ namespace Blinker {
|
| 35 | 35 |
* @param[in] mgrs managers |
| 36 | 36 |
* @param[in] dirBase base directory |
| 37 | 37 |
*/ |
| 38 |
-FlexiPix::FlexiPix(const std::string &name, Mgrs &mgrs, |
|
| 38 |
+EtherPix::EtherPix(const std::string &name, Mgrs &mgrs, |
|
| 39 | 39 |
const Directory &dirBase): |
| 40 | 40 |
Module(name, mgrs, dirBase), |
| 41 | 41 |
m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr),
|
| 42 |
- m_fileConfig(dirBase.getFile("flexipix.flp")),
|
|
| 42 |
+ m_fileConfig(dirBase.getFile("etherpix.etp")),
|
|
| 43 | 43 |
m_pDisplay(NULL) |
| 44 | 44 |
{
|
| 45 | 45 |
// set up |
| ... | ... |
@@ -48,7 +48,7 @@ FlexiPix::FlexiPix(const std::string &name, Mgrs &mgrs, |
| 48 | 48 |
} |
| 49 | 49 |
|
| 50 | 50 |
/// virtual destructor |
| 51 |
-FlexiPix::~FlexiPix() |
|
| 51 |
+EtherPix::~EtherPix() |
|
| 52 | 52 |
{
|
| 53 | 53 |
// clean up |
| 54 | 54 |
destroyDisplay(); |
| ... | ... |
@@ -57,13 +57,13 @@ FlexiPix::~FlexiPix() |
| 57 | 57 |
} |
| 58 | 58 |
|
| 59 | 59 |
/// check for update of configuration |
| 60 |
-void FlexiPix::updateConfig() |
|
| 60 |
+void EtherPix::updateConfig() |
|
| 61 | 61 |
{
|
| 62 | 62 |
// input stream name file was modified -> re-get input stream |
| 63 | 63 |
if (m_fileInStream.checkModified()) |
| 64 | 64 |
m_fileInStream.update(); |
| 65 | 65 |
|
| 66 |
- // FlexiPix config file was modified -> re-create display |
|
| 66 |
+ // EtherPix config file was modified -> re-create display |
|
| 67 | 67 |
if (m_fileConfig.checkModified()) |
| 68 | 68 |
createDisplay(); |
| 69 | 69 |
} |
| ... | ... |
@@ -73,56 +73,56 @@ void FlexiPix::updateConfig() |
| 73 | 73 |
* @param[in] stream stream name |
| 74 | 74 |
* @param[in] pFrame current frame (NULL for none) |
| 75 | 75 |
*/ |
| 76 |
-void FlexiPix::setFrame(const std::string &stream, stBlinkenFrame *pFrame) |
|
| 76 |
+void EtherPix::setFrame(const std::string &stream, stBlinkenFrame *pFrame) |
|
| 77 | 77 |
{
|
| 78 | 78 |
displayFrame(pFrame); |
| 79 | 79 |
(void)stream; // unused |
| 80 | 80 |
} |
| 81 | 81 |
|
| 82 | 82 |
/// callback when requested time reached |
| 83 |
-void FlexiPix::timeCall() |
|
| 83 |
+void EtherPix::timeCall() |
|
| 84 | 84 |
{
|
| 85 | 85 |
// refresh frame |
| 86 | 86 |
sendFrame(); |
| 87 | 87 |
} |
| 88 | 88 |
|
| 89 |
-/// (re-)create FlexiPix display |
|
| 90 |
-void FlexiPix::createDisplay() |
|
| 89 |
+/// (re-)create EtherPix display |
|
| 90 |
+void EtherPix::createDisplay() |
|
| 91 | 91 |
{
|
| 92 |
-#ifdef BLINKER_CFG_FLEXIPIX |
|
| 92 |
+#ifdef BLINKER_CFG_ETHERPIX |
|
| 93 | 93 |
destroyDisplay(); |
| 94 | 94 |
|
| 95 | 95 |
// create a display |
| 96 |
- m_pDisplay = flp_display_create(m_fileConfig.getPath().c_str(), NULL, NULL); |
|
| 96 |
+ m_pDisplay = etp_display_create(m_fileConfig.getPath().c_str(), NULL, NULL); |
|
| 97 | 97 |
if (!m_pDisplay) |
| 98 | 98 |
return; |
| 99 | 99 |
|
| 100 | 100 |
// get size of display |
| 101 |
- flp_display_get_size(m_pDisplay, &m_size.m_width, &m_size.m_height); |
|
| 101 |
+ etp_display_get_size(m_pDisplay, &m_size.m_width, &m_size.m_height); |
|
| 102 | 102 |
|
| 103 | 103 |
// output current frame |
| 104 | 104 |
displayFrame(m_fileInStream.getCurFrame()); |
| 105 |
-#endif // #ifdef BLINKER_CFG_FLEXIPIX |
|
| 105 |
+#endif // #ifdef BLINKER_CFG_ETHERPIX |
|
| 106 | 106 |
} |
| 107 | 107 |
|
| 108 |
-/// destroy FlexiPix display |
|
| 109 |
-void FlexiPix::destroyDisplay() |
|
| 108 |
+/// destroy EtherPix display |
|
| 109 |
+void EtherPix::destroyDisplay() |
|
| 110 | 110 |
{
|
| 111 |
-#ifdef BLINKER_CFG_FLEXIPIX |
|
| 111 |
+#ifdef BLINKER_CFG_ETHERPIX |
|
| 112 | 112 |
if (m_pDisplay) {
|
| 113 |
- flp_display_free(m_pDisplay); |
|
| 113 |
+ etp_display_free(m_pDisplay); |
|
| 114 | 114 |
m_pDisplay = NULL; |
| 115 | 115 |
} |
| 116 |
-#endif // #ifdef BLINKER_CFG_FLEXIPIX |
|
| 116 |
+#endif // #ifdef BLINKER_CFG_ETHERPIX |
|
| 117 | 117 |
} |
| 118 | 118 |
|
| 119 | 119 |
/** |
| 120 |
- * @brief display frame on FlexiPix |
|
| 120 |
+ * @brief display frame on EtherPix |
|
| 121 | 121 |
* @param[in] pFrame frame to display (or NULL) |
| 122 | 122 |
*/ |
| 123 |
-void FlexiPix::displayFrame(stBlinkenFrame *pFrame) |
|
| 123 |
+void EtherPix::displayFrame(stBlinkenFrame *pFrame) |
|
| 124 | 124 |
{
|
| 125 |
-#ifdef BLINKER_CFG_FLEXIPIX |
|
| 125 |
+#ifdef BLINKER_CFG_ETHERPIX |
|
| 126 | 126 |
char data[65536]; |
| 127 | 127 |
bool haveData = false; |
| 128 | 128 |
stBlinkenFrame *pClonedFrame; |
| ... | ... |
@@ -131,12 +131,12 @@ void FlexiPix::displayFrame(stBlinkenFrame *pFrame) |
| 131 | 131 |
if (!m_pDisplay) |
| 132 | 132 |
return; |
| 133 | 133 |
|
| 134 |
- // convert frame to needed size and then to MCUF data as FlexiPix library |
|
| 134 |
+ // convert frame to needed size and then to MCUF data as EtherPix library |
|
| 135 | 135 |
// can read data section of MCUF packet |
| 136 | 136 |
|
| 137 | 137 |
// frame available |
| 138 | 138 |
if (pFrame) {
|
| 139 |
- // format matches (size matches and 24bit RGB as required by FlexiPix) |
|
| 139 |
+ // format matches (size matches and 24bit RGB as required by EtherPix) |
|
| 140 | 140 |
if (BlinkenFrameGetWidth(pFrame) == (int)m_size.m_width && |
| 141 | 141 |
BlinkenFrameGetHeight(pFrame) == (int)m_size.m_height && |
| 142 | 142 |
BlinkenFrameGetChannels(pFrame) == 3 && |
| ... | ... |
@@ -161,30 +161,30 @@ void FlexiPix::displayFrame(stBlinkenFrame *pFrame) |
| 161 | 161 |
} |
| 162 | 162 |
} |
| 163 | 163 |
|
| 164 |
- // data available -> to FlexiPix display |
|
| 164 |
+ // data available -> to EtherPix display |
|
| 165 | 165 |
if (haveData) |
| 166 |
- flp_display_data(m_pDisplay, (flp_u8_t*)(data + 12), 3, m_size.m_width * 3, |
|
| 166 |
+ etp_display_data(m_pDisplay, (etp_u8_t*)(data + 12), 3, m_size.m_width * 3, |
|
| 167 | 167 |
0, 0, m_size.m_width, m_size.m_height); |
| 168 |
- // no data available -> clear FlexiPix display |
|
| 168 |
+ // no data available -> clear EtherPix display |
|
| 169 | 169 |
else |
| 170 |
- flp_display_data_clear(m_pDisplay); |
|
| 170 |
+ etp_display_data_clear(m_pDisplay); |
|
| 171 | 171 |
|
| 172 | 172 |
// send configured frame |
| 173 | 173 |
sendFrame(); |
| 174 |
-#else // #ifdef BLINKER_CFG_FLEXIPIX |
|
| 174 |
+#else // #ifdef BLINKER_CFG_ETHERPIX |
|
| 175 | 175 |
(void)pFrame; |
| 176 |
-#endif // #ifdef BLINKER_CFG_FLEXIPIX else |
|
| 176 |
+#endif // #ifdef BLINKER_CFG_ETHERPIX else |
|
| 177 | 177 |
} |
| 178 | 178 |
|
| 179 |
-/// (re-)send frame to FlexiPix |
|
| 180 |
-void FlexiPix::sendFrame() |
|
| 179 |
+/// (re-)send frame to EtherPix |
|
| 180 |
+void EtherPix::sendFrame() |
|
| 181 | 181 |
{
|
| 182 |
-#ifdef BLINKER_CFG_FLEXIPIX |
|
| 182 |
+#ifdef BLINKER_CFG_ETHERPIX |
|
| 183 | 183 |
if (m_pDisplay) {
|
| 184 |
- flp_display_send(m_pDisplay); |
|
| 184 |
+ etp_display_send(m_pDisplay); |
|
| 185 | 185 |
m_mgrs.m_callMgr.requestTimeCall(this, Time::now() + Time(1)); // refresh |
| 186 | 186 |
} |
| 187 |
-#endif // #ifdef BLINKER_CFG_FLEXIPIX |
|
| 187 |
+#endif // #ifdef BLINKER_CFG_ETHERPIX |
|
| 188 | 188 |
} |
| 189 | 189 |
|
| 190 | 190 |
} // namespace Blinker |
| ... | ... |
@@ -3,8 +3,8 @@ |
| 3 | 3 |
Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 4 | 4 |
a blinkenarea.org project */ |
| 5 | 5 |
|
| 6 |
-#ifndef BLINKER_FLEXIPIX_H |
|
| 7 |
-#define BLINKER_FLEXIPIX_H |
|
| 6 |
+#ifndef BLINKER_ETHERPIX_H |
|
| 7 |
+#define BLINKER_ETHERPIX_H |
|
| 8 | 8 |
|
| 9 | 9 |
#include <string> |
| 10 | 10 |
|
| ... | ... |
@@ -22,8 +22,8 @@ |
| 22 | 22 |
|
| 23 | 23 |
namespace Blinker {
|
| 24 | 24 |
|
| 25 |
-/// FlexiPix output module |
|
| 26 |
-class FlexiPix: public Module, public StreamRecv, public TimeCallee |
|
| 25 |
+/// EtherPix output module |
|
| 26 |
+class EtherPix: public Module, public StreamRecv, public TimeCallee |
|
| 27 | 27 |
{
|
| 28 | 28 |
public: |
| 29 | 29 |
/** |
| ... | ... |
@@ -32,17 +32,17 @@ public: |
| 32 | 32 |
* @param[in] mgrs managers |
| 33 | 33 |
* @param[in] dirBase base directory |
| 34 | 34 |
*/ |
| 35 |
- FlexiPix(const std::string &name, Mgrs &mgrs, const Directory &dirBase); |
|
| 35 |
+ EtherPix(const std::string &name, Mgrs &mgrs, const Directory &dirBase); |
|
| 36 | 36 |
|
| 37 | 37 |
/// virtual destructor |
| 38 |
- virtual ~FlexiPix(); |
|
| 38 |
+ virtual ~EtherPix(); |
|
| 39 | 39 |
|
| 40 | 40 |
private: |
| 41 | 41 |
/// copy constructor disabled |
| 42 |
- FlexiPix(const FlexiPix &that); |
|
| 42 |
+ EtherPix(const EtherPix &that); |
|
| 43 | 43 |
|
| 44 | 44 |
/// assignment operator disabled |
| 45 |
- const FlexiPix & operator=(const FlexiPix &that); |
|
| 45 |
+ const EtherPix & operator=(const EtherPix &that); |
|
| 46 | 46 |
|
| 47 | 47 |
public: |
| 48 | 48 |
/// check for update of configuration |
| ... | ... |
@@ -59,29 +59,29 @@ public: |
| 59 | 59 |
virtual void timeCall(); |
| 60 | 60 |
|
| 61 | 61 |
protected: |
| 62 |
- /// (re-)create FlexiPix display |
|
| 62 |
+ /// (re-)create EtherPix display |
|
| 63 | 63 |
void createDisplay(); |
| 64 | 64 |
|
| 65 |
- /// destroy FlexiPix display |
|
| 65 |
+ /// destroy EtherPix display |
|
| 66 | 66 |
void destroyDisplay(); |
| 67 | 67 |
|
| 68 | 68 |
/** |
| 69 |
- * @brief display frame on FlexiPix |
|
| 69 |
+ * @brief display frame on EtherPix |
|
| 70 | 70 |
* @param[in] pFrame frame to display (or NULL) |
| 71 | 71 |
*/ |
| 72 | 72 |
void displayFrame(stBlinkenFrame *pFrame); |
| 73 | 73 |
|
| 74 |
- /// (re-)send frame to FlexiPix |
|
| 74 |
+ /// (re-)send frame to EtherPix |
|
| 75 | 75 |
void sendFrame(); |
| 76 | 76 |
|
| 77 | 77 |
protected: |
| 78 | 78 |
InStreamFile m_fileInStream; ///< input stream name file |
| 79 |
- File m_fileConfig; ///< FlexiPix config file |
|
| 80 |
- struct flp_display_s *m_pDisplay; ///< FlexiPix display |
|
| 81 |
- Size m_size; ///< size of FlexiPix display |
|
| 82 |
-}; // class FlexiPix |
|
| 79 |
+ File m_fileConfig; ///< EtherPix config file |
|
| 80 |
+ struct etp_display_s *m_pDisplay; ///< EtherPix display |
|
| 81 |
+ Size m_size; ///< size of EtherPix display |
|
| 82 |
+}; // class EtherPix |
|
| 83 | 83 |
|
| 84 | 84 |
} // namespace Blinker |
| 85 | 85 |
|
| 86 |
-#endif // #ifndef BLINKER_FLEXIPIX_H |
|
| 86 |
+#endif // #ifndef BLINKER_ETHERPIX_H |
|
| 87 | 87 |
|
| ... | ... |
@@ -9,7 +9,7 @@ |
| 9 | 9 |
#include "Canvas.h" |
| 10 | 10 |
#include "Directory.h" |
| 11 | 11 |
#include "Filter.h" |
| 12 |
-#include "FlexiPix.h" |
|
| 12 |
+#include "EtherPix.h" |
|
| 13 | 13 |
#include "Loveletter.h" |
| 14 | 14 |
#include "Mgrs.h" |
| 15 | 15 |
#include "ModuleMgr.h" |
| ... | ... |
@@ -47,7 +47,7 @@ void run(const std::string &dirConfig) |
| 47 | 47 |
|
| 48 | 48 |
MODULEMGR(Canvas, canvases); |
| 49 | 49 |
MODULEMGR(Filter, filters); |
| 50 |
- MODULEMGR(FlexiPix, flexipixes); |
|
| 50 |
+ MODULEMGR(EtherPix, etherpixes); |
|
| 51 | 51 |
MODULEMGR(Loveletter, loveletters); |
| 52 | 52 |
MODULEMGR(OpPrinter, opprinters); |
| 53 | 53 |
MODULEMGR(OpSplitter, opsplitters); |