Lines Matching defs:this
39 STATE_MACH_T *this;
41 STP_MALLOC(this, STATE_MACH_T, "state machine");
43 this->State = BEGIN;
44 this->name = (char*) strdup (name);
45 this->changeState = False;
47 this->debug = False;
48 this->ignoreHop2State = BEGIN;
50 this->concreteEnterState = concreteEnterState;
51 this->concreteCheckCondition = concreteCheckCondition;
52 this->concreteGetStatName = concreteGetStatName;
53 this->owner.owner = owner;
55 return this;
59 STP_state_mach_delete (STATE_MACH_T *this)
61 free (this->name);
62 STP_FREE(this, "state machine");
66 STP_check_condition (STATE_MACH_T* this)
70 bret = (*(this->concreteCheckCondition)) (this);
72 this->changeState = True;
79 STP_change_state (STATE_MACH_T* this)
84 if (! this->changeState) break;
85 (*(this->concreteEnterState)) (this);
86 this->changeState = False;
87 (void) STP_check_condition (this);
94 STP_hop_2_state (STATE_MACH_T* this, unsigned int new_state)
97 switch (this->debug) {
100 if (new_state == this->State || new_state == this->ignoreHop2State) break;
102 this->name,
103 *this->owner.port->owner->name ? this->owner.port->owner->name : "Glbl",
104 this->owner.port->port_name,
105 (*(this->concreteGetStatName)) (this->State),
106 (*(this->concreteGetStatName)) (new_state));
109 if (new_state == this->State) break;
111 this->name,
112 *this->owner.stpm->name ? this->owner.stpm->name : "Glbl",
113 (*(this->concreteGetStatName)) (this->State),
114 (*(this->concreteGetStatName)) (new_state));
119 this->State = new_state;
120 this->changeState = True;