Module class_TraceEmitter

The trace emitter class, base class for all (WOOPER-based) emitters of traces.

Description

The trace emitter class, base class for all (WOOPER-based) emitters of traces.

Data Types

app_timestamp()

app_timestamp() = traces:app_timestamp()

attribute_entry()

attribute_entry() = {attribute_name(), attribute_value()}

attribute_name()

attribute_name() = wooper:attribute_name()

attribute_value()

attribute_value() = wooper:attribute_value()

bin_emitter_categorization()

bin_emitter_categorization() = traces:bin_emitter_categorization()

bin_string()

bin_string() = text_utils:bin_string()

classname()

classname() = wooper:classname()

emitter_any_categorization()

emitter_any_categorization() = traces:emitter_any_categorization()

emitter_categorization()

emitter_categorization() = traces:emitter_categorization()

emitter_init()

emitter_init() = emitter_name() | {emitter_name(), emitter_categorization()}

Initialising a trace emitter is specifying its name to the constructor of its actual class, which will augment that information with the correspond class-specific emitter categorization. Then, the pair resulting from this one-shot, initial operation will climb up the class hierarchy until reaching the class_TraceEmitter constructor.

See also the trace_categorize/1 macro.

emitter_name()

emitter_name() = text_utils:any_string()

The name of a trace emitter.

It is a plain string or a binary one, containing the name of a trace emitter.

Note: dots are not allowed in an emitter name (they are used as naming separator).

For example "MyObject 16", or <<"First Talker">>.

emitter_pid()

emitter_pid() = wooper:instance_pid()

PID of a trace emitter.

instance_pid()

instance_pid() = pid()

message()

message() = traces:message()

message_categorization()

message_categorization() = traces:message_categorization()

method_argument()

method_argument() = wooper:method_argument()

method_arguments()

method_arguments() = wooper:method_arguments()

method_internal_result()

method_internal_result() = wooper:method_internal_result()

method_name()

method_name() = wooper:method_name()

oneway_name()

oneway_name() = wooper:oneway_name()

oneway_return()

oneway_return() = wooper:oneway_return()

preformatted_trace()

preformatted_trace() = bin_string()

A preformatted trace that can be sent to the trace aggregator and directly stored/written by it.

request_name()

request_name() = wooper:request_name()

request_result()

request_result() = any()

request_result()

request_result(T) = wooper:request_result(T)

request_return()

request_return(T) = wooper:request_return(T)

requests_outcome()

requests_outcome() = wooper:requests_outcome()

trace_severity()

trace_severity() = traces:trace_severity()

ustring()

ustring() = text_utils:ustring()

Function Index

addKeyValueToAttribute/4
addToAttribute/3
appendToAttribute/3
await_output_completion/0Awaits for the completion of trace (echoed) outputs.
concatToAttribute/3
decrementAttribute/2
deleteFromAttribute/3
executeConstOneway/2
executeConstOneway/3
executeConstOnewayAs/3
executeConstOnewayAs/4
executeConstRequest/2
executeConstRequest/3
executeConstRequestAs/3
executeConstRequestAs/4
executeOneway/2
executeOneway/3
executeOnewayAs/3
executeOnewayAs/4
executeRequest/2
executeRequest/3
executeRequestAs/3
executeRequestAs/4
getAttribute/2
getAttributes/2
getMaybeAttribute/2
get_categorization/1Returns the categorization of this trace emitter.
get_plain_name/1Returns the name of this trace emitter, as a plain string (not as a binary).
get_short_description/1Returns a short description of this trace emitter.
get_trace_timestamp/1Returns the current trace-level timestamp (that is possibly an execution tick offset), or the atom 'none' if the emitter time is not known.
get_trace_timestamp_as_binary/1Returns the current trace-level timestamp, as a binary string.
hasAttribute/2
incrementAttribute/2
init/1Initialises some context-specific information.
is_wooper_debug/0
popFromAttribute/2
register_bridge/1Declares additionally a trace bridge in the process of this emitter instance.
removeAttribute/2
send/3Sends the specified (unsynchronised) trace message from this emitter.
send/4Sends the specified (unsynchronised) trace message from this emitter.
send/5Sends the specified (unsynchronised) trace message from this emitter.
send_categorized_emitter/4
send_named_emitter/4
send_safe/3Sends the specified (unsynchronised) trace message from this emitter, echoing it through basic traces as well.
send_safe/4Sends the specified (unsynchronised) trace message from this emitter.
send_safe/5Sends the specified synchronised trace message that is furthermore echoed, from this emitter.
send_synchronised/3Sends the specified synchronised trace message (the synchronisation answer is requested and waited) from this emitter.
send_synchronised/4Sends the specified synchronised trace message (the synchronisation answer is requested and waited) from this emitter.
send_synchronised/5Sends the specified synchronised trace message (the synchronisation answer is requested and awaited) from this emitter.
setAttribute/3
setAttributes/2
set_categorization/2Sets the categorization of this trace emitter.
subtractFromAttribute/3
swapInAttribute/3
sync/1Synchronises the caller with the trace aggregator, ensuring that all (asynchronous) operations it triggered on this aggregator are over.
toggleAttribute/2
wooper_destruct/1
wooper_effective_method_execution/4
wooper_execute_method/3
wooper_execute_method_as/4
wooper_get_class_specific_attributes/0
wooper_handle_local_oneway_execution/3
wooper_handle_local_request_execution/3
wooper_handle_remote_oneway_execution/3
wooper_handle_remote_request_execution/4
wooper_main_loop/1

Function Details

addKeyValueToAttribute/4

addKeyValueToAttribute(State::wooper:state(), AttributeName::attribute_name(), Key::table:key(), Value::table:value()) -> wooper:state()

addToAttribute/3

addToAttribute(State::wooper:state(), AttributeName::attribute_name(), Value::attribute_value()) -> wooper:state()

appendToAttribute/3

appendToAttribute(State::wooper:state(), AttributeName::attribute_name(), Element::attribute_value()) -> wooper:state()

await_output_completion/0

await_output_completion() -> void()

Awaits for the completion of trace (echoed) outputs.

No firm guarantee, done of a best-effort basis.

concatToAttribute/3

concatToAttribute(State::wooper:state(), AttributeName::attribute_name(), List::attribute_value()) -> wooper:state()

decrementAttribute/2

decrementAttribute(State::wooper:state(), AttributeName::attribute_name()) -> wooper:state()

deleteFromAttribute/3

deleteFromAttribute(State::wooper:state(), AttributeName::attribute_name(), Element::attribute_value()) -> wooper:state()

executeConstOneway/2

executeConstOneway(State::wooper:state(), OnewayAtom::oneway_name()) -> void()

executeConstOneway/3

executeConstOneway(State::wooper:state(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> void()

executeConstOnewayAs/3

executeConstOnewayAs(State::wooper:state(), Classname::classname(), OnewayAtom::oneway_name()) -> void()

executeConstOnewayAs/4

executeConstOnewayAs(State::wooper:state(), Classname::classname(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> void()

executeConstRequest/2

executeConstRequest(State::wooper:state(), RequestAtom::request_name()) -> method_internal_result()

executeConstRequest/3

executeConstRequest(State::wooper:state(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> method_internal_result()

executeConstRequestAs/3

executeConstRequestAs(State::wooper:state(), ParentClassname::classname(), RequestAtom::request_name()) -> method_internal_result()

executeConstRequestAs/4

executeConstRequestAs(State::wooper:state(), Classname::classname(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> method_internal_result()

executeOneway/2

executeOneway(State::wooper:state(), OnewayAtom::oneway_name()) -> wooper:state()

executeOneway/3

executeOneway(State::wooper:state(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> wooper:state()

executeOnewayAs/3

executeOnewayAs(State::wooper:state(), ParentClassname::classname(), OnewayAtom::oneway_name()) -> wooper:state()

executeOnewayAs/4

executeOnewayAs(State::wooper:state(), Classname::classname(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> wooper:state()

executeRequest/2

executeRequest(State::wooper:state(), RequestAtom::request_name()) -> {wooper:state(), method_internal_result()}

executeRequest/3

executeRequest(State::wooper:state(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> {wooper:state(), method_internal_result()}

executeRequestAs/3

executeRequestAs(State::wooper:state(), ParentClassname::classname(), RequestAtom::request_name()) -> {wooper:state(), method_internal_result()}

executeRequestAs/4

executeRequestAs(State::wooper:state(), Classname::classname(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> {wooper:state(), method_internal_result()}

getAttribute/2

getAttribute(State::wooper:state(), AttributeName::attribute_name()) -> attribute_value()

getAttributes/2

getAttributes(State::wooper:state(), AttributeNameList::[attribute_name()]) -> [attribute_value()]

getMaybeAttribute/2

getMaybeAttribute(State::wooper:state(), AttributeName::attribute_name()) -> maybe(attribute_value())

get_categorization/1

get_categorization(State::wooper:state()) -> bin_emitter_categorization()

Returns the categorization of this trace emitter.

(helper)

get_plain_name/1

get_plain_name(State::wooper:state()) -> ustring()

Returns the name of this trace emitter, as a plain string (not as a binary).

(helper)

get_short_description/1

get_short_description(State::wooper:state()) -> ustring()

Returns a short description of this trace emitter.

Typically useful in traces.

get_trace_timestamp/1

get_trace_timestamp(State::wooper:state()) -> app_timestamp()

Returns the current trace-level timestamp (that is possibly an execution tick offset), or the atom 'none' if the emitter time is not known.

(helper)

get_trace_timestamp_as_binary/1

get_trace_timestamp_as_binary(State::wooper:state()) -> bin_string()

Returns the current trace-level timestamp, as a binary string.

(helper)

hasAttribute/2

hasAttribute(State::wooper:state(), AttributeName::attribute_name()) -> boolean()

incrementAttribute/2

incrementAttribute(State::wooper:state(), AttributeName::attribute_name()) -> wooper:state()

init/1

init(State::wooper:state()) -> wooper:state()

Initialises some context-specific information.

(helper)

is_wooper_debug/0

is_wooper_debug() -> boolean()

popFromAttribute/2

popFromAttribute(State::wooper:state(), AttributeName::attribute_name()) -> {wooper:state(), attribute_value()}

register_bridge/1

register_bridge(State::wooper:state()) -> void()

Declares additionally a trace bridge in the process of this emitter instance.

Allows functions implemented in lower-level libraries (typically relying on Myriad) that are called directly from this instance process, or helper functions with no corresponding WOOPER state, to plug to the same trace aggregator as used by this instance with mostly the same settings, through a corresponding trace bridge (refer to the trace_bridge module).

See also: the register_as_bridge/{2,3} static methods, offered to extra, plain (non-TraceEmitter, probably not even non-WOOPER) processes that nevertheless need to send traces.

(helper)

removeAttribute/2

removeAttribute(State::wooper:state(), AttributeName::attribute_name()) -> wooper:state()

send/3

send(TraceSeverity::trace_severity(), State::wooper:state(), Message::message()) -> void()

Sends the specified (unsynchronised) trace message from this emitter.

Message is a plain string.

All information are available here, except the trace timestamp and the message categorization.

(helper)

send/4

send(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), MessageCategorization::message_categorization()) -> void()

Sends the specified (unsynchronised) trace message from this emitter.

All information available but the timestamp, determining its availability.

(helper)

send/5

send(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), MessageCategorization::message_categorization(), AppTimestamp::app_timestamp()) -> void()

Sends the specified (unsynchronised) trace message from this emitter.

By far the most used sending primitive.

(helper)

send_categorized_emitter/4

send_categorized_emitter(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), EmitterCategorization::emitter_categorization()) -> void()

send_named_emitter/4

send_named_emitter(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), EmitterName::emitter_name()) -> void()

send_safe/3

send_safe(TraceSeverity::trace_severity(), State::wooper:state(), Message::message()) -> void()

Sends the specified (unsynchronised) trace message from this emitter, echoing it through basic traces as well.

Message is a plain string.

All information are available here, except the trace timestamp and the message categorization.

(helper)

send_safe/4

send_safe(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), MessageCategorization::message_categorization()) -> void()

Sends the specified (unsynchronised) trace message from this emitter.

All information available but the timestamp, determining its availability.

(helper)

send_safe/5

send_safe(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), MessageCategorization::message_categorization(), AppTimestamp::app_timestamp()) -> void()

Sends the specified synchronised trace message that is furthermore echoed, from this emitter.

Sends all types of synchronised traces (the synchronisation answer is requested and awaited).

(helper)

send_synchronised/3

send_synchronised(TraceSeverity::trace_severity(), State::wooper:state(), Message::message()) -> void()

Sends the specified synchronised trace message (the synchronisation answer is requested and waited) from this emitter.

All information are available here, except the trace timestamp and the message categorization.

(helper)

send_synchronised/4

send_synchronised(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), MessageCategorization::message_categorization()) -> void()

Sends the specified synchronised trace message (the synchronisation answer is requested and waited) from this emitter.

All information available but the timestamp, determining its availability.

(helper)

send_synchronised/5

send_synchronised(TraceSeverity::trace_severity(), State::wooper:state(), Message::message(), MessageCategorization::message_categorization(), AppTimestamp::app_timestamp()) -> void()

Sends the specified synchronised trace message (the synchronisation answer is requested and awaited) from this emitter.

(helper)

setAttribute/3

setAttribute(State::wooper:state(), AttributeName::attribute_name(), AttributeValue::attribute_value()) -> wooper:state()

setAttributes/2

setAttributes(State::wooper:state(), ListOfAttributePairs::[attribute_entry()]) -> wooper:state()

set_categorization/2

set_categorization(TraceEmitterAnyCategorization::emitter_any_categorization(), State::wooper:state()) -> wooper:state()

Sets the categorization of this trace emitter.

Setting that categorization early in the constructor, before sending any trace, allows to have all traces for a given emitter be correctly gathered in the same category, which is a lot clearer when browsing traces afterwards.

(helper)

subtractFromAttribute/3

subtractFromAttribute(State::wooper:state(), AttributeName::attribute_name(), Value::attribute_value()) -> wooper:state()

swapInAttribute/3

swapInAttribute(State::wooper:state(), AttributeName::attribute_name(), NewAttributeValue::attribute_value()) -> {wooper:state(), attribute_value()}

sync/1

sync(State::wooper:state()) -> void()

Synchronises the caller with the trace aggregator, ensuring that all (asynchronous) operations it triggered on this aggregator are over.

Useful to ensure that traces have been fully received and stored before continuing (possibly with a VM crash).

toggleAttribute/2

toggleAttribute(State::wooper:state(), BooleanAttributeName::attribute_name()) -> wooper:state()

wooper_destruct/1

wooper_destruct(State::wooper:state()) -> wooper:state()

wooper_effective_method_execution/4

wooper_effective_method_execution(SelectedModule::module(), MethodAtom::method_name(), State::wooper:state(), Parameters::method_arguments()) -> {wooper:state(), method_internal_result()}

wooper_execute_method/3

wooper_execute_method(MethodAtom::method_name(), Parameters::method_arguments(), State::wooper:state()) -> {wooper:state(), method_internal_result()}

wooper_execute_method_as/4

wooper_execute_method_as(ParentClassname::classname(), MethodAtom::method_name(), Parameters::method_arguments(), State::wooper:state()) -> {wooper:state(), method_internal_result()}

wooper_get_class_specific_attributes/0

wooper_get_class_specific_attributes() -> [wooper_info:attribute_spec()]

wooper_handle_local_oneway_execution/3

wooper_handle_local_oneway_execution(OnewayAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments()) -> wooper:state()

wooper_handle_local_request_execution/3

wooper_handle_local_request_execution(RequestAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments()) -> {wooper:state(), method_internal_result()}

wooper_handle_remote_oneway_execution/3

wooper_handle_remote_oneway_execution(OnewayAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments()) -> wooper:state()

wooper_handle_remote_request_execution/4

wooper_handle_remote_request_execution(RequestAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments(), CallerPid::pid()) -> wooper:state()

wooper_main_loop/1

wooper_main_loop(State::wooper:state()) -> deleted


Generated by EDoc