MADARA  3.4.1
madara::knowledge::Hive Class Reference

Knowledge bases linked with shared memory to a central hive concept. More...

#include <Hive.h>

Public Member Functions

 Hive ()
 Default constructor. More...
 
 ~Hive ()
 Destructor. More...
 
void clear (void)
 Clears the hive of knowledge values. More...
 
std::vector< knowledge::KnowledgeBase > & get_kbs (void)
 Returns a reference to the underlying hive knowledge bases. More...
 
size_t get_size (void)
 Returns the size of the hive. More...
 
void resize (size_t new_size)
 Resizes the hive to a certain number of shared knowledge bases. More...
 

Private Attributes

std::vector< madara::knowledge::KnowledgeBasekbs_
 Knowledge base. More...
 
std::vector< madara::transport::SharedMemoryPush * > transports_
 transports meant for fast memory transport within the controller More...
 

Detailed Description

Knowledge bases linked with shared memory to a central hive concept.

Definition at line 66 of file Hive.h.

Constructor & Destructor Documentation

◆ Hive()

madara::knowledge::Hive::Hive ( )

Default constructor.

Copyright(c) 2020 Galois.

All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following acknowledgments and disclaimers.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The names "Galois," "Carnegie Mellon University," "SEI" and/or "Software Engineering Institute" shall not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact permi.nosp@m.ssio.nosp@m.n@sei.nosp@m..cmu.nosp@m..edu.
  4. Products derived from this software may not be called "SEI" nor may "SEI" appear in their names without prior written permission of permi.nosp@m.ssio.nosp@m.n@sei.nosp@m..cmu.nosp@m..edu.
  5. Redistributions of any form whatsoever must retain the following acknowledgment:

    This material is based upon work funded and supported by the Department of Defense under Contract No. FA8721-05-C-0003 with Carnegie Mellon University for the operation of the Software Engineering Institute, a federally funded research and development center. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the United States Department of Defense.

    NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.

    This material has been approved for public release and unlimited distribution.

Definition at line 53 of file Hive.cpp.

◆ ~Hive()

madara::knowledge::Hive::~Hive ( )

Destructor.

Definition at line 57 of file Hive.cpp.

Member Function Documentation

◆ clear()

void madara::knowledge::Hive::clear ( void  )
inline

Clears the hive of knowledge values.

Definition at line 82 of file Hive.h.

◆ get_kbs()

std::vector<knowledge::KnowledgeBase>& madara::knowledge::Hive::get_kbs ( void  )
inline

Returns a reference to the underlying hive knowledge bases.

Returns
linked knowledge bases

Definition at line 94 of file Hive.h.

◆ get_size()

size_t madara::knowledge::Hive::get_size ( void  )
inline

Returns the size of the hive.

Definition at line 102 of file Hive.h.

◆ resize()

void madara::knowledge::Hive::resize ( size_t  new_size)

Resizes the hive to a certain number of shared knowledge bases.

Parameters
new_sizethe number of linked knowledge bases to create

Definition at line 62 of file Hive.cpp.

Member Data Documentation

◆ kbs_

std::vector<madara::knowledge::KnowledgeBase> madara::knowledge::Hive::kbs_
private

Knowledge base.

Definition at line 115 of file Hive.h.

◆ transports_

std::vector<madara::transport::SharedMemoryPush*> madara::knowledge::Hive::transports_
private

transports meant for fast memory transport within the controller

Definition at line 118 of file Hive.h.


The documentation for this class was generated from the following files: