knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
knowrob::prolog Namespace Reference

Functions

foreign_t log_message2 (term_t level_term, term_t msg_term)
 
foreign_t log_message4 (term_t level_term, term_t msg_term, term_t file_term, term_t line_term)
 

Variables

PL_extension PL_extension_algebra []
 
PL_extension PL_extension_semweb []
 

Function Documentation

◆ log_message2()

foreign_t knowrob::prolog::log_message2 ( term_t  level_term,
term_t  msg_term 
)

Implements the predicate log_message/2.

Parameters
level_terman atom encoding the log level
msg_termthe logged term

Definition at line 57 of file logging.cpp.

57  {
58  return pl_log_message_internal(level_term, msg_term, __FILE__, __LINE__);
59  }

◆ log_message4()

foreign_t knowrob::prolog::log_message4 ( term_t  level_term,
term_t  msg_term,
term_t  file_term,
term_t  line_term 
)

Implements the predicate log_message/4.

Parameters
level_terman atom encoding the log level
msg_termthe logged term
file_terman atom encoding the file source
line_terma number indicating the line number

Definition at line 61 of file logging.cpp.

61  {
62  atom_t file_atom;
63  int line_number = 0;
64  if (PL_get_atom(file_term, &file_atom) &&
65  PL_get_integer(line_term, &line_number)) {
66  const char *file_string = PL_atom_chars(file_atom);
67  return pl_log_message_internal(level_term, msg_term, file_string, line_number);
68  } else {
69  return log_message2(level_term, msg_term);
70  }
71  }
foreign_t log_message2(term_t level_term, term_t msg_term)
Definition: logging.cpp:57

Variable Documentation

◆ PL_extension_algebra

PL_extension knowrob::prolog::PL_extension_algebra
Initial value:
= {
{"quaternion_inverse", 2, (pl_function_t) quaternion_inverse, 0},
{"quaternion_transform", 3, (pl_function_t) quaternion_transform, 0},
{"quaternion_multiply", 3, (pl_function_t) quaternion_multiply, 0},
{"quaternion_diff", 3, (pl_function_t) quaternion_diff, 0},
{"quaternion_slerp", 4, (pl_function_t) quaternion_slerp, 0},
{"quaternion_matrix", 4, (pl_function_t) quaternion_matrix, 0},
{"matrix_quaternion", 4, (pl_function_t) matrix_quaternion, 0},
{"matrix_translation", 2, (pl_function_t) matrix_translation, 0},
{nullptr, 0, nullptr, 0}
}
foreign_t quaternion_transform(term_t t_Quaternion, term_t t_Vector, term_t t_Transformed)
Definition: algebra.cpp:78
foreign_t matrix_translation(term_t t_Matrix, term_t t_Translation)
Definition: algebra.cpp:143
foreign_t matrix_quaternion(term_t t_Matrix, term_t t_Quaternion)
Definition: algebra.cpp:133
foreign_t quaternion_inverse(term_t t_Quaternion, term_t t_Inverse)
Definition: algebra.cpp:70
foreign_t quaternion_diff(term_t t_Quaternion1, term_t t_Quaternion2, term_t t_Diff)
Definition: algebra.cpp:97
foreign_t quaternion_multiply(term_t t_Quaternion1, term_t t_Quaternion2, term_t t_Multiplied)
Definition: algebra.cpp:88
foreign_t quaternion_matrix(term_t t_Quaternion, term_t t_Translation, term_t t_Matrix)
Definition: algebra.cpp:118
foreign_t quaternion_slerp(term_t t_Quaternion1, term_t t_Quaternion2, term_t t_Factor, term_t t_Interpolated)
Definition: algebra.cpp:106

Definition at line 12 of file algebra.h.

◆ PL_extension_semweb

PL_extension knowrob::prolog::PL_extension_semweb
Initial value:
= {
{"sw_url_graph", 2, (pl_function_t) sw_url_graph2, 0},
{"sw_url_version", 2, (pl_function_t) sw_url_version2, 0},
{"sw_default_graph_cpp", 3, (pl_function_t) sw_default_graph3, 0},
{"sw_origin_any", 1, (pl_function_t) sw_origin_any1, 0},
{"sw_origin_system", 1, (pl_function_t) sw_origin_system1, 0},
{"sw_origin_session", 1, (pl_function_t) sw_origin_session1, 0},
{"sw_origin_user", 1, (pl_function_t) sw_origin_user1, 0},
{"sw_origin_reasoner", 1, (pl_function_t) sw_origin_reasoner1, 0},
{"sw_origin_test", 1, (pl_function_t) sw_origin_test1, 0},
{"sw_set_default_graph_cpp", 3, (pl_function_t) sw_set_default_graph3, 0},
{"sw_graph_get_imports_cpp", 4, (pl_function_t) sw_graph_get_imports4, 0},
{"sw_graph_add_direct_import_cpp", 4, (pl_function_t) sw_graph_add_direct_import4, 0},
{"sw_current_graph_cpp", 3, (pl_function_t) sw_current_graph3, 0},
{"sw_set_current_graph_cpp", 3, (pl_function_t) sw_set_current_graph3, 0},
{"sw_unset_current_graph_cpp", 3, (pl_function_t) sw_unset_current_graph3, 0},
{"sw_load_rdf_xml_cpp", 4, (pl_function_t) sw_load_rdf_xml4, 0},
{nullptr, 0, nullptr, 0}
}
foreign_t sw_load_rdf_xml4(term_t t_manager, term_t t_reasoner, term_t t_url, term_t t_parentGraph)
Definition: semweb.cpp:156
foreign_t sw_origin_any1(term_t t_origin)
Definition: semweb.cpp:114
foreign_t sw_url_version2(term_t t_url, term_t t_version)
Definition: semweb.cpp:147
foreign_t sw_url_graph2(term_t t_url, term_t t_graph)
Definition: semweb.cpp:138
foreign_t sw_origin_reasoner1(term_t t_origin)
Definition: semweb.cpp:130
foreign_t sw_current_graph3(term_t t_manager, term_t t_reasoner, term_t t_graph)
Definition: semweb.cpp:36
foreign_t sw_origin_system1(term_t t_origin)
Definition: semweb.cpp:118
foreign_t sw_graph_add_direct_import4(term_t t_manager, term_t t_reasoner, term_t t_importer, term_t t_imported)
Definition: semweb.cpp:71
foreign_t sw_set_default_graph3(term_t t_manager, term_t t_reasoner, term_t t_graph)
Definition: semweb.cpp:98
foreign_t sw_graph_get_imports4(term_t t_manager, term_t t_reasoner, term_t t_importer, term_t t_importedList)
Definition: semweb.cpp:85
foreign_t sw_unset_current_graph3(term_t t_manager, term_t t_reasoner, term_t t_origin)
Definition: semweb.cpp:59
foreign_t sw_origin_user1(term_t t_origin)
Definition: semweb.cpp:126
foreign_t sw_origin_session1(term_t t_origin)
Definition: semweb.cpp:122
foreign_t sw_default_graph3(term_t t_manager, term_t t_reasoner, term_t t_graph)
Definition: semweb.cpp:109
foreign_t sw_set_current_graph3(term_t t_manager, term_t t_reasoner, term_t t_graph)
Definition: semweb.cpp:47
foreign_t sw_origin_test1(term_t t_origin)
Definition: semweb.cpp:134

Definition at line 12 of file semweb.h.