Skip to content
Snippets Groups Projects
Select Git revision
  • 8e0d97f33636d8fa79bb137551b175b4ba50c887
  • master default protected
  • replication_test
  • dev protected
  • release-1.10 protected
  • release-1.9 protected
  • 551-init-broker-service-permissions
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • 485-fixity-checks
  • 530-various-schema-problems-with-subsets
  • release-1.7 protected
  • v1.10.2 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
  • v1.9.2 protected
  • v1.9.2-rc0 protected
41 results

dbrepo-1.6.2-py3-none-any.whl

Blame
  • smile_fee_cmd.c 27.61 KiB
    /**
     * @file   fee_cmd.c
     * @author Armin Luntzer (armin.luntzer@univie.ac.at),
     * @date   2018
     *
     * @copyright GPLv2
     * This program is free software; you can redistribute it and/or modify it
     * under the terms and conditions of the GNU General Public License,
     * version 2, as published by the Free Software Foundation.
     *
     * This program is distributed in the hope it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
     * more details.
     *
     * @brief SMILE FEE RMAP command library
     * @see SMILE FEE to DPU Interface Requirements Document MSSL-SMILE-SXI-IRD-0001
     *
     * @note I realise that the actual register accessors are somewhat redundant
     *	 since they only reference the registers by a numeric id and could be
     *	 converted into a single function in principle. This file is however
     *	 an adaptation from code for the PLATO RDUC, so this was the easiest
     *	 approach, as I might create a more generic lower/intermediate
     *	 (i.e. rmap command generation and transaction control) library,
     *	 since the methods used here and for PLATO are IMO the smartest way
     *	 to approach remote instrument RMAP control. This does however require
     *	 a specific call interface, where I don't want va_args, so I can't just
     *	 add another parameter.
     */
    
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    #include <rmap.h>
    #include <smile_fee_cmd.h>
    #include <smile_fee_rmap.h>
    
    
    /**
     * @brief generate a read command for an arbitrary register (internal)
     *
     * @param trans_id a transaction identifier
     *
     * @param cmd the command buffer; if NULL, the function returns the needed size
     *
     * @param addr the register address
     *
     * @note this will configure a multi-address, 4 byte wide read command, because
     *	 the IWF RMAP core does not support single address read commands
     */
    
    static int fee_read_cmd_register_internal(uint16_t trans_id, uint8_t *cmd,
    					   uint32_t addr)
    {
    	return smile_fee_gen_cmd(trans_id, cmd, RMAP_READ_ADDR_INC, addr, 4);
    }
    
    
    /**
     * @brief generate a write command for an arbitrary register (internal)
     *
     * @param trans_id a transaction identifier
     *
     * @param cmd the command buffer; if NULL, the function returns the needed size
     *
     * @param addr the register address
     *
     * @returns the size of the command data buffer or 0 on error