Delay

Time delay element model

[ libohymos | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

template <class T>
class Delay : public Element
{

public:
void Set_parameter(FILE* fp);
void Set_parameter(long timeLag_z) ;
void Set_initial_state(FILE* fp);
void Set_initial_state(time_t cp_z, T newestValue_z) ;
void Save_terminal_state(FILE *fp) ;
void Save_terminal_state(time_t& ct, T& value) ;
Boolean Init(char* o_name, int o_num) ;
Delay(char* o_name, int o_num) ;
Delay(void) ;
~Delay(void) ;
Boolean Work(void);
time_t Necessary_time_from(Receive_port*);
protected:
ReceiveNointp<T> rp;
void Register_receive_ports(void) ;
Send<T> sp;
long timeLag;
T newestValue;
Boolean Initial_output(void);
time_t Calculate_time_step(void);
Boolean Can_you_calculate(void) ;
Boolean Calculate(void);
}; // Delay

Back to the top of Delay


DESCRIPTION

Time delay element model which receives Data and outputs it at a delayed time by "timeLag."

[receive ports] One receive port of type ReceiveNointp. Its object name is "rp" and object number is 0.

[send port] One send port of type Send. Its object name is "sp" and its object number is 0.

Back to the top of Delay


ReceiveNointp<T> rp;

Receive port.

  ReceiveNointp<T> rp;

Back to the top of Delay


void Register_receive_ports(void) ;

  void Register_receive_ports(void)                                                         
;

Function is currently defined inline.


Back to the top of Delay


Send<T> sp;

Send port

  Send<T> sp;                                   // output

Back to the top of Delay


long timeLag;

timeLag parameter. timeLag must not be negative.

  long timeLag;

Back to the top of Delay


T newestValue;

the newest data value which was sent to "sp".

  T newestValue;

Back to the top of Delay


void Set_parameter(FILE* fp);

Reads in parameter value timeLag from a file.

scanf(fp, "%ld", &timeLag);

  void Set_parameter(FILE* fp);

Back to the top of Delay


void Set_parameter(long timeLag_z) ;

Sets the parameter value timeLag to timeLag_z

  void Set_parameter(long timeLag_z)                                                     
;

Function is currently defined inline.


Back to the top of Delay


void Set_initial_state(FILE* fp);

Reads in initial values of the state variables from a file. current_time and data value at current_time are the state variables. In the file fp, current_time and the data value must be given in one line.

  void Set_initial_state(FILE* fp);

Back to the top of Delay


void Set_initial_state(time_t cp_z, T newestValue_z) ;

Sets initial values of the state variables from its arguments.

in cp_z
- current_time
in newestValue_z
- newest value

  void Set_initial_state(time_t cp_z, T newestValue_z)                                                                          
;

Function is currently defined inline.


Back to the top of Delay


void Save_terminal_state(FILE *fp) ;

Writes terminal states, that is, current time and newestValue to a file.

in fp
- file pointer to the file

  void Save_terminal_state(FILE *fp)                                                                                                                      
;

Function is currently defined inline.


Back to the top of Delay


void Save_terminal_state(time_t& ct, T& value) ;

Get terminal states, that is, current time and newestValue to arguments.

out ct
- current_time
out value
- newestValue

  void Save_terminal_state(time_t& ct, T& value)                                                 
;

Function is currently defined inline.


Back to the top of Delay


Boolean Init(char* o_name, int o_num) ;

Sets the object name to o_name and the object number to o_num

  Boolean Init(char* o_name, int o_num)                    ;

Function is currently defined inline.


Back to the top of Delay


Delay(char* o_name, int o_num) ;

Constructor. Sets the object name to o_name and the object number to o_num

  Delay(char* o_name, int o_num) ;

Function is currently defined inline.


Back to the top of Delay


Delay(void) ;

Constructor.

  Delay(void) ;

Function is currently defined inline.


Back to the top of Delay


~Delay(void) ;

Destructor

  ~Delay(void)   ;

Function is currently defined inline.


Back to the top of Delay


Boolean Initial_output(void);

Initial output

  Boolean Initial_output(void);

Back to the top of Delay


time_t Calculate_time_step(void);

Calculate time step.

  time_t Calculate_time_step(void);

Back to the top of Delay


Boolean Can_you_calculate(void) ;

  Boolean Can_you_calculate(void)                
;

Function is currently defined inline.


Back to the top of Delay


Boolean Calculate(void);

  Boolean Calculate(void);

Back to the top of Delay


Boolean Work(void);

  Boolean Work(void);

Back to the top of Delay


time_t Necessary_time_from(Receive_port*);

  time_t Necessary_time_from(Receive_port*);

Back to the top of Delay


All Members

public:
char* Class_name(void) ;
char* Object_name(void) ;
int Object_number(void) ;
void* Owner(void) ;
Boolean Compare(char* c_name, char* o_name, int o_num);
Boolean Compare(char* o_name, int o_num);
Boolean Compare(Object* obj);
Boolean Set_owner(void* o);
void Cprint(FILE* fp_out, char* head);
void Cprint(FILE* fp_out) ;
void Cprint(char* head ) ;
void Oprint(FILE* fp_out, char* head);
void Oprint(FILE* fp_out) ;
void Oprint(char* head ) ;
void Absname( char* absname );
Boolean Init(char* o_name, int o_num);
enum OperationFlag ;
Boolean Register(void* obj, int num);
Boolean Construct(void);
void* Get_receive_port(char* c_name, char* o_name, int o_num );
void* Get_send_port(char* c_name, char* o_name, int o_num );
void* Get_receive_port(char* o_name, int o_num );
void* Get_send_port(char* o_name, int o_num );
void* Get_object(char* c_name, char* o_name, int o_num );
void* Get_component(char* c_name, char* o_name, int o_num ) ;
void* Get_component(char* o_name, int o_num ) ;
Boolean Switch(void);
Boolean Are_you_ready(void);
Boolean Set_data_string(char* d_str, int d_strlen );
void Clear_data_string(void);
Boolean Get_data_string(char* d_str);
void Set_parameter(FILE* fp) ;
void Parameter(FILE* fp, char*& buffer, int buflen, Boolean& stock_p);
void Set_initial_state(FILE* fp) ;
void Initial_state(FILE* fp, char*& buffer, int buflen, Boolean& stock_p);
Boolean Share_info(void) ;
void Save_send_port_stock(FILE* fp);
void Restore_send_port_stock(void);
time_t Current_time(void) ;
time_t Time_step(void) ;
time_t Next_time(void) ;
time_t Terminal_time(void) ;
time_t MediumTermTargetTime(void) ;
time_t Fixed_time(void) ;
time_t Target_time(void) ;
void Rewind_current_time(void);
void Renew_fixed_time(void);
void Initialize_target_time(void) ;
void Renew_target_time(time_t itrs);
time_t Calculate_iteration_step(void);
time_t Necessary_time_from(Receive_port* rp);
time_t Necessary_time_to(Receive_port* rp);
Boolean Initial_time(time_t i_time);
Boolean Initial_work(void);
Boolean Can_you_calculate(void) ;
Boolean Record_status(void);
Boolean Work(void) ;
Boolean Do_you_reach_target_time(void);
void Flush_data(void);
void Creq(void) ;
void Print_receive_ports(FILE* fp , char* head ) ;
void Print_send_ports(FILE* fp , char* head ) ;
void Print_connection(FILE* fp , char* head );
void Save_terminal_state(FILE* fp) ;
void Terminal_state(FILE* fp);
Element* NewElement() ;
Boolean Init(char*, int, FILE*) ;
Boolean Init(char* o_name, int o_num, int num_of_objs , char* p_str ) ;
Boolean Init(char* o_name, int o_num, char* p_str) ;
void Set_parameter(long timeLag_z) ;
void Set_initial_state(time_t cp_z, T newestValue_z) ;
void Save_terminal_state(FILE *fp) ;
void Save_terminal_state(time_t& ct, T& value) ;
time_t Necessary_time_from(Receive_port*);
protected:
char* class_name;
char* object_name;
int object_number;
void* owner;
Boolean initialworkdone_p;
Boolean shareinfodone_p;
List* object_list;
void** receive_port_array;
int number_of_receive_ports;
void** send_port_array;
int number_of_send_ports;
void** object_array;
int number_of_objects;
char* data_string;
time_t current_time;
time_t time_step;
time_t fixed_time;
time_t target_time;
Boolean mCreqp;
void* Get_from_list(char* c_name, char* o_name, int o_num);
void* Get_from_list(char* o_name, int o_num);
Boolean Register(void* obj);
void Register_receive_ports(void) ;
void Register_send_ports(void) ;
Boolean Make_object_array(void**& obj_array, int& num_of_objs);
Boolean Set_object_array(int num_of_objs);
void* Get_from_array(char* c_name, char* o_name, int o_num, void** obj_array, int num_of_objs);
void* Get_from_array(char* o_name, int o_num, void** obj_array, int num_of_objs);
Boolean Look_data_string(char*& buffer);
char* Get_line(FILE* fp, char* buffer, int buflen, Boolean& stock_p, int& iflag);
void Get_line(FILE*fp, char* buffer, int buflen, char* fname, int line_number);
void Cur2fix2tar(void) ;
Boolean Renew_current_time(void) ;
Boolean Initial_output(void) ;
time_t Calculate_time_step(void) ;
Boolean Can_you_calculate0(void);
Boolean Can_you_calculate1(void);
Boolean Calculate(void) ;
void Set_data_pack_array(void);
void Reduce_data_pack_stock(void);
Boolean Print_status(void) ;
Boolean Work0(void);
Boolean Work1(void);
Boolean Work2(void);
Boolean Work3(void);
void Send_stocked_data(void);
void Print_objects(FILE* fp, char* head, char* title, void** obj_array, int number_of_objs);
ReceiveNointp<T> rp;
Send<T> sp;
long timeLag;
T newestValue;

Back to the top of Delay


Ancestors

Inheritance chain for Delay:

Back to the top of Delay


Descendants

Class is not inherited by any others.

Back to the top of Delay


Generated from source by the Cocoon utilities on Sun Sep 3 22:51:59 2000 .

Report problems to jkotula@stratasys.com