PetaVision  Alpha
BaseConnectionProbe.hpp
1 /*
2  * BaseConnectionProbe.hpp
3  *
4  * Created on: Oct 20, 2011
5  * Author: pschultz
6  */
7 
8 #ifndef BASECONNECTIONPROBE_HPP_
9 #define BASECONNECTIONPROBE_HPP_
10 
11 #include "../connections/BaseConnection.hpp"
12 
13 enum PatchIDMethod { INDEX_METHOD, COORDINATE_METHOD };
14 
15 namespace PV {
16 
18 
19  // Methods
20  public:
21  BaseConnectionProbe(const char *name, HyPerCol *hc);
22  virtual ~BaseConnectionProbe();
23 
24  virtual Response::Status respond(std::shared_ptr<BaseMessage const> message) override;
25 
26  BaseConnection *getTargetConn() { return mTargetConn; }
27 
28  protected:
29  BaseConnectionProbe(); // Default constructor, can only be called by derived
30  // classes
31  int initialize(const char *name, HyPerCol *hc);
32  virtual void ioParam_targetName(enum ParamsIOFlag ioFlag) override;
33 
34  Response::Status respondConnectionProbeWriteParams(
35  std::shared_ptr<ConnectionProbeWriteParamsMessage const> message);
36 
37  Response::Status respondConnectionOutput(std::shared_ptr<ConnectionOutputMessage const> message);
38 
39  virtual Response::Status
40  communicateInitInfo(std::shared_ptr<CommunicateInitInfoMessage const> message) override;
41 
42  virtual Response::Status registerData(Checkpointer *checkpointer) override;
43 
49  virtual void initOutputStreams(const char *filename, Checkpointer *checkpointer) override;
50 
51  // Member Variables
52  protected:
53  BaseConnection *mTargetConn = nullptr; // The connection being probed.
54  Timer *mIOTimer = nullptr;
55 };
56 
57 } // end of namespace PV block
58 
59 #endif /* BASECONNECTIONPROBE_HPP_ */
virtual Response::Status registerData(Checkpointer *checkpointer) override
virtual void ioParam_targetName(enum ParamsIOFlag ioFlag) override
targetName: the name of the object that the probe attaches to. In LayerProbe, targetName is used to d...
virtual Response::Status communicateInitInfo(std::shared_ptr< CommunicateInitInfoMessage const > message) override
virtual void initOutputStreams(const char *filename, Checkpointer *checkpointer) override