projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fertling about.
[feisty_meow.git]
/
octopi
/
library
/
octopus
/
tentacle.cpp
diff --git
a/octopi/library/octopus/tentacle.cpp
b/octopi/library/octopus/tentacle.cpp
index 7c618033de97b43d6e062c855a7255857634f144..cda8f3d2d90a03f15ff40813bce11436278638b3 100644
(file)
--- a/
octopi/library/octopus/tentacle.cpp
+++ b/
octopi/library/octopus/tentacle.cpp
@@
-19,10
+19,12
@@
#include <basis/astring.h>
#include <basis/mutex.h>
#include <basis/astring.h>
#include <basis/mutex.h>
+#include <loggers/program_wide_logger.h>
#include <processes/ethread.h>
#include <structures/amorph.h>
using namespace basis;
#include <processes/ethread.h>
#include <structures/amorph.h>
using namespace basis;
+using namespace loggers;
using namespace processes;
using namespace structures;
using namespace processes;
using namespace structures;
@@
-99,6
+101,8
@@
const char *tentacle::outcome_name(const outcome &to_name)
int tentacle::motivational_rate() const
{ if (_action) return _action->sleep_time(); else return 0; }
int tentacle::motivational_rate() const
{ if (_action) return _action->sleep_time(); else return 0; }
+entity_data_bin *tentacle::get_storage() { return _products; }
+
void tentacle::attach_storage(entity_data_bin &storage)
{
_products = &storage;
void tentacle::attach_storage(entity_data_bin &storage)
{
_products = &storage;
@@
-114,13
+118,11
@@
void tentacle::detach_storage()
bool tentacle::store_product(infoton *product,
const octopus_request_id &original_id)
{
bool tentacle::store_product(infoton *product,
const octopus_request_id &original_id)
{
-#ifdef DEBUG_TENTACLE
FUNCDEF("store_product");
FUNCDEF("store_product");
-#endif
if (!_products) {
if (!_products) {
-#ifdef DEBUG_TENTACLE
+
//
#ifdef DEBUG_TENTACLE
LOG("storage bunker has not been established!");
LOG("storage bunker has not been established!");
-#endif
+
//
#endif
return false;
}
return _products->add_item(product, original_id);
return false;
}
return _products->add_item(product, original_id);
@@
-167,9
+169,7
@@
infoton *tentacle::next_request(octopus_request_id &item_id)
void tentacle::propel_arm()
{
void tentacle::propel_arm()
{
-#ifdef DEBUG_TENTACLE
FUNCDEF("propel_arm");
FUNCDEF("propel_arm");
-#endif
infoton *next_item = NIL;
do {
octopus_request_id id;
infoton *next_item = NIL;
do {
octopus_request_id id;