mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01:00 
			
		
		
		
	fix some typos (#136)
* removed one section that was duplicate in dptconvert.cpp
This commit is contained in:
		
							parent
							
								
									95cf9df7fc
								
							
						
					
					
						commit
						ed54da7089
					
				@ -51,9 +51,9 @@ void EspPlatform::restart()
 | 
			
		||||
 | 
			
		||||
void EspPlatform::setupMultiCast(uint32_t addr, uint16_t port)
 | 
			
		||||
{
 | 
			
		||||
    _mulitcastAddr = htonl(addr);
 | 
			
		||||
    _mulitcastPort = port;
 | 
			
		||||
    IPAddress mcastaddr(_mulitcastAddr);
 | 
			
		||||
    _multicastAddr = htonl(addr);
 | 
			
		||||
    _multicastPort = port;
 | 
			
		||||
    IPAddress mcastaddr(_multicastAddr);
 | 
			
		||||
    
 | 
			
		||||
    Serial.printf("setup multicast addr: %s port: %d ip: %s\n", mcastaddr.toString().c_str(), port,
 | 
			
		||||
        WiFi.localIP().toString().c_str());
 | 
			
		||||
@ -69,7 +69,7 @@ void EspPlatform::closeMultiCast()
 | 
			
		||||
bool EspPlatform::sendBytesMultiCast(uint8_t * buffer, uint16_t len)
 | 
			
		||||
{
 | 
			
		||||
    //printHex("<- ",buffer, len);
 | 
			
		||||
    _udp.beginPacketMulticast(_mulitcastAddr, _mulitcastPort, WiFi.localIP());
 | 
			
		||||
    _udp.beginPacketMulticast(_multicastAddr, _multicastPort, WiFi.localIP());
 | 
			
		||||
    _udp.write(buffer, len);
 | 
			
		||||
    _udp.endPacket();
 | 
			
		||||
    return true;
 | 
			
		||||
 | 
			
		||||
@ -33,8 +33,8 @@ class EspPlatform : public ArduinoPlatform
 | 
			
		||||
    void commitToEeprom();
 | 
			
		||||
private:
 | 
			
		||||
    WiFiUDP _udp;
 | 
			
		||||
    uint32_t _mulitcastAddr;
 | 
			
		||||
    uint16_t _mulitcastPort;
 | 
			
		||||
    uint32_t _multicastAddr;
 | 
			
		||||
    uint16_t _multicastPort;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,9 @@
 | 
			
		||||
 | 
			
		||||
#include "table_object.h"
 | 
			
		||||
/**
 | 
			
		||||
 * This class represents the group address table. It provides a mapping between tranport layer 
 | 
			
		||||
 * This class represents the group address table. It provides a mapping between transport layer 
 | 
			
		||||
 * service access points (TSAP) and group addresses. The TSAP can be imagined as an index to the array 
 | 
			
		||||
 * of group adresses.
 | 
			
		||||
 * of group addresses.
 | 
			
		||||
 * 
 | 
			
		||||
 * See section 4.10 of @cite knx:3/5/1 for further details.
 | 
			
		||||
 * It implements realisation type 7 (see section 4.10.7 of @cite knx:3/5/1). 
 | 
			
		||||
@ -13,9 +13,9 @@ class AddressTableObject : public TableObject
 | 
			
		||||
{
 | 
			
		||||
  public:
 | 
			
		||||
    /**
 | 
			
		||||
     * The contructor.
 | 
			
		||||
     * The constructor.
 | 
			
		||||
     * 
 | 
			
		||||
     * @param memory This parameter is only passed to the custructor of TableObject an not used by this class.
 | 
			
		||||
     * @param memory This parameter is only passed to the constructor of TableObject and is not used by this class.
 | 
			
		||||
     */
 | 
			
		||||
    AddressTableObject(Memory& memory);
 | 
			
		||||
    const uint8_t* restore(const uint8_t* buffer) override;
 | 
			
		||||
@ -35,7 +35,7 @@ class AddressTableObject : public TableObject
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the TSAP mapped to a group address.
 | 
			
		||||
     * 
 | 
			
		||||
     * @param groupAddress the group address of whicht to get the TSAP for.
 | 
			
		||||
     * @param groupAddress the group address of which to get the TSAP for.
 | 
			
		||||
     * 
 | 
			
		||||
     * @return the TSAP if found or zero if no tsap was found.
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
@ -66,7 +66,7 @@ void ApplicationLayer::dataGroupIndication(HopCountType hopType, Priority priori
 | 
			
		||||
            case GroupValueWrite:
 | 
			
		||||
                _bau.groupValueWriteIndication(asap, priority, hopType, secCtrl, data, len);
 | 
			
		||||
            default:
 | 
			
		||||
                /* other apdutypes ar not valid here. If the appear do nothing */
 | 
			
		||||
                /* other apdutypes are not valid here. If they appear do nothing */
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@ -908,7 +908,7 @@ void ApplicationLayer::groupValueSend(ApduType type, AckType ack, uint16_t asap,
 | 
			
		||||
    uint8_t* apdudata = apdu.data();
 | 
			
		||||
    if (dataLength == 0)
 | 
			
		||||
    {
 | 
			
		||||
        // data size is six bit or less. So store int first byte
 | 
			
		||||
        // data size is six bit or less. So store in first byte
 | 
			
		||||
        *apdudata &= ~0x3f;
 | 
			
		||||
        *apdudata |= (*data & 0x3f);
 | 
			
		||||
    }
 | 
			
		||||
@ -916,7 +916,7 @@ void ApplicationLayer::groupValueSend(ApduType type, AckType ack, uint16_t asap,
 | 
			
		||||
    {
 | 
			
		||||
        memcpy(apdudata + 1, data, dataLength);
 | 
			
		||||
    }
 | 
			
		||||
    // no need to check if there is a tsap. This is a response, so the read got trough
 | 
			
		||||
    // no need to check if there is a tsap. This is a response, so the read got through
 | 
			
		||||
    uint16_t tsap = (uint16_t)_assocTable->translateAsap(asap);
 | 
			
		||||
    dataGroupRequest(ack, hopType, priority, tsap, apdu, secCtrl);
 | 
			
		||||
    dataGroupIndication(hopType, priority, tsap, apdu, secCtrl);
 | 
			
		||||
@ -1129,7 +1129,7 @@ void ApplicationLayer::individualIndication(HopCountType hopType, Priority prior
 | 
			
		||||
            _bau.keyWriteAppLayerConfirm(priority, hopType, tsap, secCtrl, data[1]);
 | 
			
		||||
            break;
 | 
			
		||||
        default:
 | 
			
		||||
            print("Indiviual-indication: unhandled APDU-Type: ");
 | 
			
		||||
            print("Individual-indication: unhandled APDU-Type: ");
 | 
			
		||||
            println(apdu.type());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -1240,7 +1240,7 @@ void ApplicationLayer::individualConfirm(AckType ack, HopCountType hopType, Prio
 | 
			
		||||
            _bau.keyWriteResponseConfirm(ack, priority, hopType, tsap, secCtrl, data[1], status);
 | 
			
		||||
            break;
 | 
			
		||||
        default:
 | 
			
		||||
            print("Indiviual-confirm: unhandled APDU-Type: ");
 | 
			
		||||
            print("Individual-confirm: unhandled APDU-Type: ");
 | 
			
		||||
            println(apdu.type());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@ class TransportLayer;
 | 
			
		||||
 * This is an implementation of the application layer as specified in @cite knx:3/5/1.
 | 
			
		||||
 * It provides methods for the BusAccessUnit to do different things and translates this 
 | 
			
		||||
 * call to an APDU and calls the correct method of the TransportLayer. 
 | 
			
		||||
 * It also takes calls from TransportLayer, decodes the submitted APDU and calls the coresponding
 | 
			
		||||
 * It also takes calls from TransportLayer, decodes the submitted APDU and calls the corresponding
 | 
			
		||||
 * methods of the BusAccessUnit class.
 | 
			
		||||
 */
 | 
			
		||||
class ApplicationLayer
 | 
			
		||||
@ -31,12 +31,12 @@ class ApplicationLayer
 | 
			
		||||
    void associationTableObject(AssociationTableObject& assocTable);
 | 
			
		||||
 | 
			
		||||
    // from transport layer
 | 
			
		||||
    // Note: without data secure feature, the application layer is just used with SecurtyControl.dataSecurity = None
 | 
			
		||||
    // Note: without data secure feature, the application layer is just used with SecurityControl.dataSecurity = None
 | 
			
		||||
    // hooks that can be implemented by derived class (e.g. SecureApplicationLayer)
 | 
			
		||||
 | 
			
		||||
#pragma region Transport - Layer - Callbacks
 | 
			
		||||
    /**
 | 
			
		||||
     * Somebody send us an APDU via multicast communiation. See 3.2 of @cite knx:3/3/4. 
 | 
			
		||||
     * Somebody send us an APDU via multicast communication. See 3.2 of @cite knx:3/3/4. 
 | 
			
		||||
     * See also ApplicationLayer::dataGroupConfirm and TransportLayer::dataGroupRequest.
 | 
			
		||||
     * This method is called by the TransportLayer.
 | 
			
		||||
     * 
 | 
			
		||||
@ -51,7 +51,7 @@ class ApplicationLayer
 | 
			
		||||
     */
 | 
			
		||||
    virtual void dataGroupIndication(HopCountType hopType, Priority priority, uint16_t tsap, APDU& apdu);
 | 
			
		||||
    /**
 | 
			
		||||
     * Report the status of an APDU that we sent via multicast communiation back to us. See 3.2 of @cite knx:3/3/4. 
 | 
			
		||||
     * Report the status of an APDU that we sent via multicast communication back to us. See 3.2 of @cite knx:3/3/4. 
 | 
			
		||||
     * See also ApplicationLayer::dataGroupConfirm and TransportLayer::dataGroupRequest. This method is called by 
 | 
			
		||||
     * the TransportLayer.
 | 
			
		||||
     * 
 | 
			
		||||
 | 
			
		||||
@ -62,7 +62,7 @@ uint8_t BauSystemB::checkmasterResetValidity(EraseCode eraseCode, uint8_t channe
 | 
			
		||||
        case EraseCode::ResetIA:
 | 
			
		||||
        {
 | 
			
		||||
            // TODO: increase download counter except for confirmed restart (PID_DOWNLOAD_COUNTER)
 | 
			
		||||
            println("ResetAP requested. Not implemented yet.");
 | 
			
		||||
            println("ResetIA requested. Not implemented yet.");
 | 
			
		||||
            return successCode;
 | 
			
		||||
        }
 | 
			
		||||
        case EraseCode::ResetLinks:
 | 
			
		||||
@ -515,7 +515,7 @@ void BauSystemB::nextRestartState()
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        case Restarted:
 | 
			
		||||
            /* restart is finished, we send a discommect */
 | 
			
		||||
            /* restart is finished, we send a disconnect */
 | 
			
		||||
            if (millis() - _restartDelay > 30)
 | 
			
		||||
            {
 | 
			
		||||
                applicationLayer().disconnectRequest(SystemPriority);
 | 
			
		||||
 | 
			
		||||
@ -49,7 +49,7 @@ uint8_t DataProperty::write(uint16_t start, uint8_t count, const uint8_t* data)
 | 
			
		||||
    start -= 1;
 | 
			
		||||
    if (start + count > _currentElements)
 | 
			
		||||
    {
 | 
			
		||||
        //reallocate memory for _data
 | 
			
		||||
        // reallocate memory for _data
 | 
			
		||||
        uint8_t* oldData = _data;
 | 
			
		||||
        size_t oldDataSize = _currentElements * ElementSize();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -132,107 +132,6 @@ int KNX_Decode_Value(uint8_t* payload, size_t payload_length, const Dpt& datatyp
 | 
			
		||||
        // DPT 239.* - Flagged Scaling
 | 
			
		||||
        if (datatype.mainGroup == 239 && datatype.subGroup == 1 && datatype.index <= 1)
 | 
			
		||||
            return busValueToFlaggedScaling(payload, payload_length, datatype, value);
 | 
			
		||||
        if (datatype.mainGroup == 4 && datatype.subGroup >= 1 && datatype.subGroup <= 2 && !datatype.index)
 | 
			
		||||
            return busValueToCharacter(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 5.* - Unsigned 8 Bit Integer
 | 
			
		||||
        if (datatype.mainGroup == 5 && ((datatype.subGroup >= 1 && datatype.subGroup <= 6 && datatype.subGroup != 2) || datatype.subGroup == 10) && !datatype.index)
 | 
			
		||||
            return busValueToUnsigned8(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 6.001/6.010 - Signed 8 Bit Integer
 | 
			
		||||
        if (datatype.mainGroup == 6 && (datatype.subGroup == 1 || datatype.subGroup == 10) && !datatype.index)
 | 
			
		||||
            return busValueToSigned8(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 6.020 - Status with Mode
 | 
			
		||||
        if (datatype.mainGroup == 6 && datatype.subGroup == 20 && datatype.index <= 5)
 | 
			
		||||
            return busValueToStatusAndMode(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 7.001/7.010/7.011/7.012/7.013 - Unsigned 16 Bit Integer
 | 
			
		||||
        if (datatype.mainGroup == 7 && (datatype.subGroup == 1 || (datatype.subGroup >= 10 && datatype.subGroup <= 13)) && !datatype.index)
 | 
			
		||||
            return busValueToUnsigned16(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 7.002-DPT 7.007 - Time Period
 | 
			
		||||
        if (datatype.mainGroup == 7 && datatype.subGroup >= 2 && datatype.subGroup <= 7 && !datatype.index)
 | 
			
		||||
            return busValueToTimePeriod(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 8.001/8.010/8.011 - Signed 16 Bit Integer
 | 
			
		||||
        if (datatype.mainGroup == 8 && (datatype.subGroup == 1 || datatype.subGroup == 10 || datatype.subGroup == 11) && !datatype.index)
 | 
			
		||||
            return busValueToSigned16(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 8.002-DPT 8.007 - Time Delta
 | 
			
		||||
        if (datatype.mainGroup == 8 && datatype.subGroup >= 2 && datatype.subGroup <= 7 && !datatype.index)
 | 
			
		||||
            return busValueToTimeDelta(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 9.* - 16 Bit Float
 | 
			
		||||
        if (datatype.mainGroup == 9 && ((datatype.subGroup >= 1 && datatype.subGroup <= 11 && datatype.subGroup != 9) || (datatype.subGroup >= 20 && datatype.subGroup <= 28)) && !datatype.index)
 | 
			
		||||
            return busValueToFloat16(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 10.* - Time and Weekday
 | 
			
		||||
        if (datatype.mainGroup == 10 && datatype.subGroup == 1 && datatype.index <= 1)
 | 
			
		||||
            return busValueToTime(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 11.* - Date
 | 
			
		||||
        if (datatype.mainGroup == 11 && datatype.subGroup == 1 && !datatype.index)
 | 
			
		||||
            return busValueToDate(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 12.* - Unsigned 32 Bit Integer
 | 
			
		||||
        if (datatype.mainGroup == 12 && datatype.subGroup == 1 && !datatype.index)
 | 
			
		||||
            return busValueToUnsigned32(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 13.001/13.002/13.010-13.015 - Signed 32 Bit Integer
 | 
			
		||||
        if (datatype.mainGroup == 13 && (datatype.subGroup == 1 || datatype.subGroup == 2 || (datatype.subGroup >= 10 && datatype.subGroup <= 15)) && !datatype.index)
 | 
			
		||||
            return busValueToSigned32(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 13.100 - Long Time Period
 | 
			
		||||
        if (datatype.mainGroup == 13 && datatype.subGroup == 100 && !datatype.index)
 | 
			
		||||
            return busValueToLongTimePeriod(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 14.* - 32 Bit Float
 | 
			
		||||
        if (datatype.mainGroup == 14 && datatype.subGroup <= 79 && !datatype.index)
 | 
			
		||||
            return busValueToFloat32(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 15.* - Access Data
 | 
			
		||||
        if (datatype.mainGroup == 15 && !datatype.subGroup && datatype.index <= 5)
 | 
			
		||||
            return busValueToAccess(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 16.* - String
 | 
			
		||||
        if (datatype.mainGroup == 16 && datatype.subGroup <= 1 && !datatype.index)
 | 
			
		||||
            return busValueToString(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 17.* - Scene Number
 | 
			
		||||
        if (datatype.mainGroup == 17 && datatype.subGroup == 1 && !datatype.index)
 | 
			
		||||
            return busValueToScene(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 18.* - Scene Control
 | 
			
		||||
        if (datatype.mainGroup == 18 && datatype.subGroup == 1 && datatype.index <= 1)
 | 
			
		||||
            return busValueToSceneControl(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 19.* - Date and Time
 | 
			
		||||
        if (datatype.mainGroup == 19 && datatype.subGroup == 1 && (datatype.index <= 3 || datatype.index == 9 || datatype.index == 10))
 | 
			
		||||
            return busValueToDateTime(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 26.* - Scene Info
 | 
			
		||||
        if (datatype.mainGroup == 26 && datatype.subGroup == 1 && datatype.index <= 1)
 | 
			
		||||
            return busValueToSceneInfo(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 28.* - Unicode String
 | 
			
		||||
        if (datatype.mainGroup == 28 && datatype.subGroup == 1 && !datatype.index)
 | 
			
		||||
            return busValueToUnicode(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 29.* - Signed 64 Bit Integer
 | 
			
		||||
        if (datatype.mainGroup == 29 && datatype.subGroup >= 10 && datatype.subGroup <= 12 && !datatype.index)
 | 
			
		||||
            return busValueToSigned64(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 219.* - Alarm Info
 | 
			
		||||
        if (datatype.mainGroup == 219 && datatype.subGroup == 1 && datatype.index <= 10)
 | 
			
		||||
            return busValueToAlarmInfo(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 221.* - Serial Number
 | 
			
		||||
        if (datatype.mainGroup == 221 && datatype.subGroup == 1 && datatype.index <= 1)
 | 
			
		||||
            return busValueToSerialNumber(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 217.* - Version
 | 
			
		||||
        if (datatype.mainGroup == 217 && datatype.subGroup == 1 && datatype.index <= 2)
 | 
			
		||||
            return busValueToVersion(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 225.001/225.002 - Scaling Speed and Scaling Step Time
 | 
			
		||||
        if (datatype.mainGroup == 225 && datatype.subGroup >= 1 && datatype.subGroup <= 2 && datatype.index <= 1)
 | 
			
		||||
            return busValueToScaling(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 225.003 - Next Tariff
 | 
			
		||||
        if (datatype.mainGroup == 225 && datatype.subGroup == 3 && datatype.index <= 1)
 | 
			
		||||
            return busValueToTariff(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 231.* - Locale
 | 
			
		||||
        if (datatype.mainGroup == 231 && datatype.subGroup == 1 && datatype.index <= 1)
 | 
			
		||||
            return busValueToLocale(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 232.600 - RGB
 | 
			
		||||
        if (datatype.mainGroup == 232 && datatype.subGroup == 600 && !datatype.index)
 | 
			
		||||
            return busValueToRGB(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 234.* - Language and Region
 | 
			
		||||
        if (datatype.mainGroup == 234 && datatype.subGroup >= 1 && datatype.subGroup <= 2 && !datatype.index)
 | 
			
		||||
            return busValueToLocale(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 235.* - Active Energy
 | 
			
		||||
        if (datatype.mainGroup == 235 && datatype.subGroup == 1 && datatype.index <= 3)
 | 
			
		||||
            return busValueToActiveEnergy(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 238.* - Scene Config
 | 
			
		||||
        if (datatype.mainGroup == 238 && datatype.subGroup == 1 && datatype.index <= 2)
 | 
			
		||||
            return busValueToSceneConfig(payload, payload_length, datatype, value);
 | 
			
		||||
        // DPT 239.* - Flagged Scaling
 | 
			
		||||
        if (datatype.mainGroup == 239 && datatype.subGroup == 1 && datatype.index <= 1)
 | 
			
		||||
            return busValueToFlaggedScaling(payload, payload_length, datatype, value);
 | 
			
		||||
    }
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
#include "data_property.h"
 | 
			
		||||
#include "callback_property.h"
 | 
			
		||||
 | 
			
		||||
//224.0.23.12
 | 
			
		||||
// 224.0.23.12
 | 
			
		||||
#define DEFAULT_MULTICAST_ADDR ((uint32_t)0xE000170C)
 | 
			
		||||
 | 
			
		||||
IpParameterObject::IpParameterObject(DeviceObject& deviceObject, Platform& platform): _deviceObject(deviceObject),
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ uint16_t KnxIpDeviceInformationDIB::individualAddress() const
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void KnxIpDeviceInformationDIB::indiviudalAddress(uint16_t value)
 | 
			
		||||
void KnxIpDeviceInformationDIB::individualAddress(uint16_t value)
 | 
			
		||||
{
 | 
			
		||||
    pushWord(value, _data + 4);
 | 
			
		||||
}
 | 
			
		||||
@ -65,7 +65,7 @@ void KnxIpDeviceInformationDIB::serialNumber(const uint8_t* value)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
uint32_t KnxIpDeviceInformationDIB::routingMulicastAddress() const
 | 
			
		||||
uint32_t KnxIpDeviceInformationDIB::routingMulticastAddress() const
 | 
			
		||||
{
 | 
			
		||||
    return getInt(_data + 14);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -16,12 +16,12 @@ class KnxIpDeviceInformationDIB : public KnxIpDIB
 | 
			
		||||
    uint8_t status() const;
 | 
			
		||||
    void status(uint8_t value);
 | 
			
		||||
    uint16_t individualAddress() const;
 | 
			
		||||
    void indiviudalAddress(uint16_t value);
 | 
			
		||||
    void individualAddress(uint16_t value);
 | 
			
		||||
    uint16_t projectInstallationIdentifier() const;
 | 
			
		||||
    void projectInstallationIdentifier(uint16_t value);
 | 
			
		||||
    const uint8_t* serialNumber() const;
 | 
			
		||||
    void serialNumber(const uint8_t* value);
 | 
			
		||||
    uint32_t routingMulicastAddress() const;
 | 
			
		||||
    uint32_t routingMulticastAddress() const;
 | 
			
		||||
    void routingMulticastAddress(uint32_t value);
 | 
			
		||||
    const uint8_t* macAddress() const;
 | 
			
		||||
    void macAddress(const uint8_t* value);
 | 
			
		||||
 | 
			
		||||
@ -19,7 +19,7 @@ KnxIpSearchResponse::KnxIpSearchResponse(IpParameterObject& parameters, DeviceOb
 | 
			
		||||
    _deviceInfo.code(DEVICE_INFO);
 | 
			
		||||
    _deviceInfo.medium(0x20); //KNX-IP FIXME get this value from somewhere else
 | 
			
		||||
    _deviceInfo.status(deviceObject.progMode());
 | 
			
		||||
    _deviceInfo.indiviudalAddress(parameters.propertyValue<uint16_t>(PID_KNX_INDIVIDUAL_ADDRESS));
 | 
			
		||||
    _deviceInfo.individualAddress(parameters.propertyValue<uint16_t>(PID_KNX_INDIVIDUAL_ADDRESS));
 | 
			
		||||
    _deviceInfo.projectInstallationIdentifier(parameters.propertyValue<uint16_t>(PID_PROJECT_INSTALLATION_ID));
 | 
			
		||||
    _deviceInfo.serialNumber(deviceObject.propertyData(PID_SERIAL_NUMBER));
 | 
			
		||||
    _deviceInfo.routingMulticastAddress(parameters.propertyValue<uint32_t>(PID_ROUTING_MULTICAST_ADDRESS));
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@
 | 
			
		||||
#define MAXTABLEOBJ 4
 | 
			
		||||
 | 
			
		||||
#ifndef KNX_FLASH_SIZE
 | 
			
		||||
# define KNX_FLASH_SIZE 1024
 | 
			
		||||
#define KNX_FLASH_SIZE 1024
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
class MemoryBlock
 | 
			
		||||
 | 
			
		||||
@ -31,7 +31,7 @@ RfMediumObject::RfMediumObject()
 | 
			
		||||
                resultData[2] = 0xFF; // permanent bidirectional device
 | 
			
		||||
                resultLength = 3;
 | 
			
		||||
            }), 
 | 
			
		||||
/*      This properties are used in NMP_LinkBudget_Measure to diagnose the Link Budget of the communication.
 | 
			
		||||
/*      These properties are used in NMP_LinkBudget_Measure to diagnose the Link Budget of the communication.
 | 
			
		||||
        This in not implemented yet.
 | 
			
		||||
        new DataProperty(PID_RF_DIAG_SA_FILTER_TABLE, true, PDT_GENERIC_03, 8, ReadLv3 | WriteLv3),
 | 
			
		||||
        new DataProperty(PID_RF_DIAG_BUDGET_TABLE, false, PDT_GENERIC_03, 8, ReadLv3 | WriteLv0),
 | 
			
		||||
 | 
			
		||||
@ -21,19 +21,19 @@ extern void delayMicroseconds (unsigned int howLong);
 | 
			
		||||
 | 
			
		||||
/*----------------------[CC1101 - misc]---------------------------------------*/
 | 
			
		||||
#define CRYSTAL_FREQUENCY         26000000
 | 
			
		||||
#define CFG_REGISTER              0x2F  //47 registers
 | 
			
		||||
#define FIFOBUFFER                0x42  //size of Fifo Buffer +2 for rssi and lqi
 | 
			
		||||
#define RSSI_OFFSET_868MHZ        0x4E  //dec = 74
 | 
			
		||||
#define TX_RETRIES_MAX            0x05  //tx_retries_max
 | 
			
		||||
#define ACK_TIMEOUT               250   //ACK timeout in ms
 | 
			
		||||
#define CC1101_COMPARE_REGISTER   0x00  //register compare 0=no compare 1=compare
 | 
			
		||||
#define BROADCAST_ADDRESS         0x00  //broadcast address
 | 
			
		||||
#define CFG_REGISTER              0x2F  // 47 registers
 | 
			
		||||
#define FIFOBUFFER                0x42  // size of Fifo Buffer +2 for rssi and lqi
 | 
			
		||||
#define RSSI_OFFSET_868MHZ        0x4E  // dec = 74
 | 
			
		||||
#define TX_RETRIES_MAX            0x05  // tx_retries_max
 | 
			
		||||
#define ACK_TIMEOUT               250   // ACK timeout in ms
 | 
			
		||||
#define CC1101_COMPARE_REGISTER   0x00  // register compare 0=no compare 1=compare
 | 
			
		||||
#define BROADCAST_ADDRESS         0x00  // broadcast address
 | 
			
		||||
#define CC1101_FREQ_315MHZ        0x01
 | 
			
		||||
#define CC1101_FREQ_434MHZ        0x02
 | 
			
		||||
#define CC1101_FREQ_868MHZ        0x03
 | 
			
		||||
#define CC1101_FREQ_915MHZ        0x04
 | 
			
		||||
#define CC1101_TEMP_ADC_MV        3.225 //3.3V/1023 . mV pro digit
 | 
			
		||||
#define CC1101_TEMP_CELS_CO       2.47  //Temperature coefficient 2.47mV per Grad Celsius
 | 
			
		||||
#define CC1101_TEMP_ADC_MV        3.225 // 3.3V/1023 . mV pro digit
 | 
			
		||||
#define CC1101_TEMP_CELS_CO       2.47  // Temperature coefficient 2.47mV per Grad Celsius
 | 
			
		||||
 | 
			
		||||
/*---------------------------[CC1101 - R/W offsets]---------------------------*/
 | 
			
		||||
#define WRITE_SINGLE_BYTE   0x00
 | 
			
		||||
@ -43,12 +43,12 @@ extern void delayMicroseconds (unsigned int howLong);
 | 
			
		||||
/*---------------------------[END R/W offsets]--------------------------------*/
 | 
			
		||||
 | 
			
		||||
/*------------------------[CC1101 - FIFO commands]----------------------------*/
 | 
			
		||||
#define TXFIFO_BURST        0x7F    //write burst only
 | 
			
		||||
#define TXFIFO_SINGLE_BYTE  0x3F    //write single only
 | 
			
		||||
#define RXFIFO_BURST        0xFF    //read burst only
 | 
			
		||||
#define RXFIFO_SINGLE_BYTE  0xBF    //read single only
 | 
			
		||||
#define PATABLE_BURST       0x7E    //power control read/write
 | 
			
		||||
#define PATABLE_SINGLE_BYTE 0xFE    //power control read/write
 | 
			
		||||
#define TXFIFO_BURST        0x7F    // write burst only
 | 
			
		||||
#define TXFIFO_SINGLE_BYTE  0x3F    // write single only
 | 
			
		||||
#define RXFIFO_BURST        0xFF    // read burst only
 | 
			
		||||
#define RXFIFO_SINGLE_BYTE  0xBF    // read single only
 | 
			
		||||
#define PATABLE_BURST       0x7E    // power control read/write
 | 
			
		||||
#define PATABLE_SINGLE_BYTE 0xFE    // power control read/write
 | 
			
		||||
/*---------------------------[END FIFO commands]------------------------------*/
 | 
			
		||||
 | 
			
		||||
/*----------------------[CC1101 - config register]----------------------------*/
 | 
			
		||||
 | 
			
		||||
@ -132,8 +132,8 @@ void RfPhysicalLayerCC1310::setOutputPowerLevel(int8_t dBm)
 | 
			
		||||
        rfPowerTableSize = PROP_RF_txPowerTableSize;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //if max power is requested then the CCFG_FORCE_VDDR_HH must be set in
 | 
			
		||||
    //the ccfg
 | 
			
		||||
    // if max power is requested then the CCFG_FORCE_VDDR_HH must be set in
 | 
			
		||||
    // the ccfg
 | 
			
		||||
#if (CCFG_FORCE_VDDR_HH != 0x1)
 | 
			
		||||
    if((newValue.paType == RF_TxPowerTable_DefaultPA) &&
 | 
			
		||||
       (dBm == rfPowerTable[rfPowerTableSize-2].power))
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user