Package org.contikios.cooja.mote.memory

Examples of org.contikios.cooja.mote.memory.VarMemory


   * @see Mote
   * @see org.contikios.cooja.MoteInterfaceHandler
   */
  public ContikiLED(Mote mote) {
    this.mote = mote;
    this.moteMem = new VarMemory(mote.getMemory());
  }
View Full Code Here


   * @see Mote
   * @see org.contikios.cooja.MoteInterfaceHandler
   */
  public ContikiVib(Mote mote) {
    this.mote = (ContikiMote) mote;
    this.moteMem = new VarMemory(mote.getMemory());
  }
View Full Code Here

     *
     * This offset will be used in Cooja in the memory abstraction to match
     * Contiki's and Cooja's address spaces */
    {
      SectionMoteMemory tmp = new SectionMoteMemory(variables);
      VarMemory varMem = new VarMemory(tmp);
      tmp.addMemorySection("tmp.data", dataSecParser.parse(0));

      tmp.addMemorySection("tmp.bss", bssSecParser.parse(0));

      try {
        int referenceVar = (int) varMem.getVariable("referenceVar").addr;
        myCoreComm.setReferenceAddress(referenceVar);
      } catch (UnknownVariableException e) {
        throw new MoteTypeCreationException("Error setting reference variable: " + e.getMessage(), e);
      } catch (RuntimeException e) {
          throw new MoteTypeCreationException("Error setting reference variable: " + e.getMessage(), e);
      }

      getCoreMemory(tmp);

      offset = varMem.getIntValueOf("referenceVar") & 0xFFFFFFFFL;
      logger.info(getContikiFirmwareFile().getName()
              + ": offsetting Cooja mote address space: 0x" + Long.toHexString(offset));
    }

    /* Create initial memory: data+bss+optional common */
 
View Full Code Here

   * @see org.contikios.cooja.MoteInterfaceHandler
   */
  public ContikiButton(Mote mote) {
    super(mote);
    this.mote = (ContikiMote) mote;
    this.moteMem = new VarMemory(mote.getMemory());
  }
View Full Code Here

   * @see org.contikios.cooja.MoteInterfaceHandler
   */
  public ContikiClock(Mote mote) {
    this.simulation = mote.getSimulation();
    this.mote = (ContikiMote) mote;
    this.moteMem = new VarMemory(mote.getMemory());
    timeDrift = 0;
    moteTime = 0;
  }
View Full Code Here

   * @see Mote
   * @see org.contikios.cooja.MoteInterfaceHandler
   */
  public ContikiCFS(Mote mote) {
    this.mote = mote;
    this.moteMem = new VarMemory(mote.getMemory());
  }
View Full Code Here

    // Read class configurations of this mote type
    RADIO_TRANSMISSION_RATE_kbps = mote.getType().getConfig().getDoubleValue(
        ContikiRadio.class, "RADIO_TRANSMISSION_RATE_kbps");

    this.mote = (ContikiMote) mote;
    this.myMoteMemory = new VarMemory(mote.getMemory());

    radioOn = myMoteMemory.getByteValueOf("simRadioHWOn") == 1;
  }
View Full Code Here

   * @see Mote
   * @see org.contikios.cooja.MoteInterfaceHandler
   */
  public ContikiBeeper(Mote mote) {
    this.mote = mote;
    this.moteMem = new VarMemory(mote.getMemory());
  }
View Full Code Here

    };


    public MicaZID(Mote mote) {
        this.mote = (MicaZMote) mote;
        this.moteMem = new VarMemory(mote.getMemory());

        if (moteMem.variableExists("node_id")) {
            contikiID = true;

            int addr = (int) moteMem.getVariableAddress("node_id");
View Full Code Here

   * @see Mote
   * @see org.contikios.cooja.MoteInterfaceHandler
   */
  public ContikiPIR(Mote mote) {
    this.mote = (ContikiMote) mote;
    this.moteMem = new VarMemory(mote.getMemory());
  }
View Full Code Here

TOP

Related Classes of org.contikios.cooja.mote.memory.VarMemory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.